localstorage-down
Advanced tools
Comparing version 0.6.4 to 0.6.5
@@ -82,7 +82,6 @@ 'use strict'; | ||
callbackify(callback, function () { | ||
var len = storage.length; | ||
var i = -1; | ||
while (++i < len) { | ||
var i = storage.length; | ||
while (--i >= 0) { | ||
var key = storage.key(i); | ||
if (key && key.substring(0, prefix.length) === prefix) { | ||
if (key.substring(0, prefix.length) === prefix) { | ||
storage.removeItem(key); | ||
@@ -89,0 +88,0 @@ } |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "0.6.4", | ||
"version": "0.6.5", | ||
"main": "index.js", | ||
@@ -18,0 +18,0 @@ "dependencies": { |
@@ -86,3 +86,3 @@ # localstorage-down [![Build Status](https://travis-ci.org/No9/localstorage-down.svg)](https://travis-ci.org/No9/localstorage-down) [![Coverage Status](https://coveralls.io/repos/No9/localstorage-down/badge.svg?branch=master&service=github)](https://coveralls.io/github/No9/localstorage-down?branch=master) | ||
http://www.youtube.com/watch?v=ExUosomc8Uc | ||
https://www.youtube.com/watch?v=9hVFCmK6GgM | ||
@@ -89,0 +89,0 @@ ## Tests |
@@ -47,2 +47,35 @@ 'use strict'; | ||
tape('test .destroy with multiple dbs', function (t) { | ||
var db = levelup('a', {db: leveldown}); | ||
var db2 = levelup('b', {db: leveldown}); | ||
var db3 = levelup('c', {db: leveldown}); | ||
db.put('1', '1', function (err) { | ||
t.notOk(err, 'no error'); | ||
db2.put('1', '1', function (err) { | ||
t.notOk(err, 'no error'); | ||
db3.put('1', '1', function (err) { | ||
t.notOk(err, 'no error'); | ||
db2.put('2', '2', function (err) { | ||
t.notOk(err, 'no error'); | ||
db2.put('3', '3', function (err) { | ||
t.notOk(err, 'no error'); | ||
leveldown.destroy('b', function (err) { | ||
t.notOk(err, 'no error'); | ||
db3.get('1', function (err, res) { | ||
t.notOk(err, 'no error'); | ||
t.equal(res, '1'); | ||
db2 = levelup('b', {db: leveldown}); | ||
db2.get('3', function (err) { | ||
t.ok(err); | ||
t.end(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
tape('test escaped db name', function (t) { | ||
@@ -49,0 +82,0 @@ var db = levelup('bang!', {db: leveldown}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
96742
830
26