Skip to content

Commit

Permalink
fresh db seeded with package names
Browse files Browse the repository at this point in the history
  • Loading branch information
zeke committed Jan 15, 2018
0 parents commit fc3b4a3
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db/.lev_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ls
get express
get express
get 'express'
ls express
ls
Binary file added db/000005.ldb
Binary file not shown.
Empty file added db/000027.log
Empty file.
Binary file added db/000028.ldb
Binary file not shown.
Binary file added db/000029.ldb
Binary file not shown.
Binary file added db/000030.ldb
Binary file not shown.
Binary file added db/000031.ldb
Binary file not shown.
Binary file added db/000032.ldb
Binary file not shown.
1 change: 1 addition & 0 deletions db/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000025
Empty file added db/LOCK
Empty file.
Empty file added db/LOG
Empty file.
Empty file added db/LOG.old
Empty file.
Binary file added db/MANIFEST-000025
Binary file not shown.
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "sourcerank-data",
"description": "experimental database of cached libraries.io SourceRank data for all the npm packages",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"all-the-package-names": "^1.3440.0",
"level": "^2.1.1"
}
}
12 changes: 12 additions & 0 deletions seed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const db = require('level')('./db')
const names = require('all-the-package-names')

for (i = 0; i < names.length; i++) {
const name = names[i]
console.log(i, name)
saveName(name)
}

async function saveName (name) {
await db.put(name, {})
}

0 comments on commit fc3b4a3

Please sign in to comment.