Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Commit 5e6e46f

Browse files
committed
Add manifest
1 parent 740cc19 commit 5e6e46f

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ var DEFAULT_PREFIX = 'level-js-'
1818

1919
function Level (location, opts) {
2020
if (!(this instanceof Level)) return new Level(location, opts)
21-
AbstractLevelDOWN.call(this)
21+
22+
AbstractLevelDOWN.call(this, {
23+
bufferKeys: support.bufferKeys(indexedDB),
24+
snapshots: true,
25+
permanence: true,
26+
clear: true
27+
})
28+
2229
opts = opts || {}
2330

2431
if (typeof location !== 'string') {
@@ -28,12 +35,6 @@ function Level (location, opts) {
2835
this.location = location
2936
this.prefix = opts.prefix || DEFAULT_PREFIX
3037
this.version = parseInt(opts.version || 1, 10)
31-
32-
// Experimental, do not externally rely on this object yet.
33-
// See Level/community#42.
34-
this.supports = {
35-
bufferKeys: support.bufferKeys(indexedDB)
36-
}
3738
}
3839

3940
inherits(Level, AbstractLevelDOWN)
@@ -211,7 +212,7 @@ Level.prototype._clear = function (options, callback) {
211212
}
212213

213214
Level.prototype._close = function (callback) {
214-
this.db.close()
215+
if (this.db) this.db.close()
215216
setImmediate(callback)
216217
}
217218

0 commit comments

Comments
 (0)