diff --git a/index.js b/index.js index be7a0fd..6307027 100644 --- a/index.js +++ b/index.js @@ -8,10 +8,11 @@ var isBuffer = require('isbuffer') var xtend = require('xtend') var toBuffer = require('typedarray-to-buffer') -function Level(location) { +function Level(location, storePrefix) { if (!(this instanceof Level)) return new Level(location) if (!location) throw new Error("constructor requires at least a location argument") this.IDBOptions = {} + this.storePrefix = storePrefix || 'IDBWrapper-' this.location = location } @@ -22,6 +23,7 @@ Level.prototype._open = function(options, callback) { var idbOpts = { storeName: this.location, + storePrefix: this.storePrefix, autoIncrement: false, keyPath: null, onStoreReady: function () {