6 ms·
Short version: node.js of course! A bit longer one: One can fetch `jsverify` package metadata from http://registry.npmjs.org/jsverify http://registry.npmjs.or
by phadej 12y ago
Short version: node.js of course!
A bit longer one:
One can fetch `jsverify` package metadata from http://registry.npmjs.org/jsverify http://registry.npmjs.org/jsverify and all current packages are listed in http://registry.npmjs.org/-/all http://registry.npmjs.org/-/all (this one is special, its size is around 50MiB). Please cache your results, let's not DDoS the registry.
There are around one gigabyte of nice JSON data. After initial fetch you can traverse it using any tools you want. I naturally used node.js for that too.
- redidas 12y agoIf you'd rather work with a SQL database, here's a module that attempts to put NPM into a Postgres database: https://www.npmjs.org/package/npm-postgres-mashup https://www.npmjs.org/package/npm-postgres-mashup
- phadej 12y agoWow, someone had time and motivation to write all of that boilerplate there. Yet e.g. the license parsing is very naive: compare https://github.com/npm/npm-www/blob/99020b5b3e21607dab24cd69a79f4bd7c6a63c70/models/package.js#L193 https://github.com/npm/npm-www/blob/99020b5b3e21607dab24cd69... and https://github.com/rickbergfalk/npm-postgres-mashup/blob/56d77cc3a66fd5aaa870dbd578ad899b5fe32d68/npm-postgres-mashup.js#L392 https://github.com/rickbergfalk/npm-postgres-mashup/blob/56d...