Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
npm (node.js) equivalent of Python's pip freeze?
#Please tell me there is a better way to do this
#(And by 'a better way', I don't mean incorporating the cut within the awk script)
npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk '{FS = "@"; print "\""$1"\"", ":", "\""$2"\""}'
@baldurthoremilsson
Copy link

@dminkovsky
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment