seequal

1.0.0 • Public • Published

Seequal

var seequal = require('seequal');
 
var query = function (name, age, callback) {
  
  // name === 'james'
  // age === 15
 
  callback( /*error*/, /*result*/ );
 
};
 
var result = seequal(query, 'james', 15);
 
result.success(function (response) {
  // called when there is no error;
  // response === any object
});
 
result.error(function (response) {
  // called when there is an error;
  // response === error
});
 
result.many(function (response) {
  // called when response is non-empty array
  // response === array
});
 
result.one(function (response) {
  // called when response is non-empty array
  // response === first child of array
});
 
result.one(function () {
  // called when response is empty array
});
 

Readme

Keywords

none

Package Sidebar

Install

npm i seequal

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • enome