pull-level
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "pull-level", | ||
"description": "pull-stream interface to levelup", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"homepage": "https://github.com/dominictarr/pull-level", | ||
@@ -20,5 +20,5 @@ "repository": { | ||
"monotonic-timestamp": "0.0.8", | ||
"levelup": "git://github.com/dominictarr/node-levelup.git#installable-reverse", | ||
"level-sublevel": "~4.1.0", | ||
"rimraf": "~2.1.4" | ||
"rimraf": "~2.1.4", | ||
"level": "~0.9.0" | ||
}, | ||
@@ -25,0 +25,0 @@ "scripts": { |
var levelup = require('levelup') | ||
var levelup = require('level') | ||
var SubLevel = require('level-sublevel') | ||
@@ -4,0 +4,0 @@ var pull = require('pull-stream') |
var levelup = require('levelup') | ||
var levelup = require('level') | ||
var SubLevel = require('level-sublevel') | ||
@@ -25,3 +25,14 @@ var pull = require('pull-stream') | ||
}}) | ||
.pipe(pull.take(20)) | ||
.pipe(function (read) { //it's like pull.take(), but check BEFORE reading | ||
var n = 20 | ||
return function (a, cb) { | ||
if(n--) | ||
read(a, cb) | ||
else | ||
cb(true) | ||
} | ||
}) | ||
.pipe(pull.map(function (e) { | ||
return {key: e.key, value: e.value}//drop 'type' from live updates | ||
})) | ||
.pipe(pull.collect(function (err, ary) { | ||
@@ -31,2 +42,4 @@ t.notOk(err) | ||
console.log(ary) | ||
console.log(all) | ||
console.log(ary.length, all.length) | ||
t.equal(ary.length, all.length) | ||
@@ -33,0 +46,0 @@ t.deepEqual(h.sort(ary), all) |
var levelup = require('levelup') | ||
var levelup = require('level') | ||
var pull = require('pull-stream') | ||
@@ -15,2 +15,4 @@ | ||
.pipe(pull.map(function (e) { | ||
// throw new Error('wtf') | ||
return { | ||
@@ -17,0 +19,0 @@ key: e.toString(), |
@@ -1,2 +0,2 @@ | ||
var levelup = require('levelup') | ||
var levelup = require('level') | ||
var SubLevel = require('level-sublevel') | ||
@@ -3,0 +3,0 @@ var pull = require('pull-stream') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11194
278