Created
April 14, 2011 23:11
-
-
Save cognominal/920800 to your computer and use it in GitHub Desktop.
print the number of npm packages. I cheated : wget http://registry.npmjs.org -O registry.json #coffee
This file contains 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
_ = require 'underscore' | |
fs = require 'fs' | |
fnm = 'registry.json' | |
json = JSON.parse fs.readFileSync fnm, 'utf8' | |
console.log (_.keys json).length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment