0.0.1 • Published 10 years ago
funmatch v0.0.1
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 () {
})
0.0.1
10 years ago