Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed deferred search in Level-js/IndexedDB.
- Loading branch information
Showing
4 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
|
||
var Leveljs = require('level-js'); | ||
module.exports = function(l) { return new Leveljs(l); }; | ||
module.exports = function(location) { | ||
var db = new Leveljs(location); | ||
|
||
// monkey patching _approximateSize | ||
// see https://github.com/maxogden/level.js/pull/21 | ||
db._approximateSize = function(a, b, callback) { | ||
var err = new Error('Not implemented'); | ||
if (callback) { | ||
return callback(err); | ||
} | ||
|
||
throw err; | ||
}; | ||
|
||
return db; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters