Created
August 10, 2011 15:16
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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