Skip to content

Instantly share code, notes, and snippets.

@capaj
Last active December 27, 2015 11:09
Show Gist options
  • Save capaj/7316565 to your computer and use it in GitHub Desktop.
Save capaj/7316565 to your computer and use it in GitHub Desktop.
just test
var forbidden = ['mongooseCollection', '_collection'];
module.exports = function (query) {
var copy = {};
for (var prop in query) {
if (forbidden.indexOf(prop) === -1) {
copy[prop] = query[prop];
}
}
return JSON.stringify(copy);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment