Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Created August 10, 2011 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-mcnally/1137094 to your computer and use it in GitHub Desktop.
Save j-mcnally/1137094 to your computer and use it in GitHub Desktop.
Node module with some useful utils i will ammend over time. Depends on underscore
module.exports = function() {
var justin = {
removeKeys: function(keys, obj) {
var newObj = {};
for (var i = 0; i < _.keys(obj).length; i++) {
var key = _.keys(obj)[i];
if (_.keys(obj).indexOf(key) == -1) {
newObj[key] = obj[key];
}
}
return newObj;
}
}
return justin;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment