Skip to content

Instantly share code, notes, and snippets.

@cognominal
Created April 14, 2011 23:11
Show Gist options
  • Save cognominal/920800 to your computer and use it in GitHub Desktop.
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
_ = 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