find

looks for a file by some criterion

object find(object|function conf);
confobject|functionthe criteria for a file
objectthe object of a file

Example

var file = vault.data.find({ by:"status", match:"failed" });
 
// a more complex criterion defined as a function:
var file = vault.data.find(function(file){
    file.status === "failed" && file.size > 20000; 
});

Details

The method takes as a parameter an object with these properties:

  • by - the field of a file object
  • match - the value to match
See also
Back to top