sorts files in the list
rule | object | an object with parameters for sorting |
vault.data.sort({
rule: function(a, b) {
return a.size < b.size ? 1 : -1;
}
});
The rule object has the following parameters:
the function must have two parameters, it will be called for each pair of adjacent values and will return a number (-1 or 1):