funmatch

0.0.1 • Public • Published
var funmatch = require("funmatch");
 
var saveProfile = funmatch([
  {
    match: { _id: {$ne: undefined }},
    handle: function (options, next) {
      // create
    }
  },
  {
    handle: function (options, next) {
      // do something
    }
  }
]);
 
 
// PUT
saveProfile({ _id: "existing" }, function () {
  
});
 
// POST
saveProfile({}, function () {
  
})

Readme

Keywords

none

Package Sidebar

Install

npm i funmatch

Weekly Downloads

1

Version

0.0.1

License

BSD-2-Clause

Last publish

Collaborators

  • architectd
  • crcn