Skip to content

Commit

Permalink
Add manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Sep 30, 2019
1 parent 740cc19 commit 5e6e46f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ var DEFAULT_PREFIX = 'level-js-'

function Level (location, opts) {
if (!(this instanceof Level)) return new Level(location, opts)
AbstractLevelDOWN.call(this)

AbstractLevelDOWN.call(this, {
bufferKeys: support.bufferKeys(indexedDB),
snapshots: true,
permanence: true,
clear: true
})

opts = opts || {}

if (typeof location !== 'string') {
Expand All @@ -28,12 +35,6 @@ function Level (location, opts) {
this.location = location
this.prefix = opts.prefix || DEFAULT_PREFIX
this.version = parseInt(opts.version || 1, 10)

// Experimental, do not externally rely on this object yet.
// See Level/community#42.
this.supports = {
bufferKeys: support.bufferKeys(indexedDB)
}
}

inherits(Level, AbstractLevelDOWN)
Expand Down Expand Up @@ -211,7 +212,7 @@ Level.prototype._clear = function (options, callback) {
}

Level.prototype._close = function (callback) {
this.db.close()
if (this.db) this.db.close()
setImmediate(callback)
}

Expand Down

0 comments on commit 5e6e46f

Please sign in to comment.