Skip to content

Instantly share code, notes, and snippets.

@dscape
Created August 28, 2014 13:42
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 dscape/b31d0a28446b645e1b49 to your computer and use it in GitHub Desktop.
Save dscape/b31d0a28446b645e1b49 to your computer and use it in GitHub Desktop.
function foo(obj) {
var keys = [];
keys.push(object.name + '@' + obj.version);
for (var key in obj) {
if (key === 'dependencies' && typeof obj[key] === 'object')
keys.push(foo(obj[key]));
}
}
return keys;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment