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 () {
  
})

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i funmatch

    Weekly Downloads

    2

    Version

    0.0.1

    License

    BSD-2-Clause

    Last publish

    Collaborators

    • architectd
    • crcn