autolevel.js

Automatically use the right abstract-leveldown module for your configuration
git clone git://git.finwo.net/lib/autolevel.js
Log | Files | Refs | README | LICENSE

commit 6e05eaae31fd6ca73bb42e7310f7fc84005bdd1d
parent 49c4efb9d422819f17273701bd3d0d2a28815e2f
Author: finwo <finwo@pm.me>
Date:   Sat, 24 Jul 2021 03:21:02 +0200

Updated readme and test to match new consistent path detection

Diffstat:
MREADME.md | 4++--
Msrc/index.test.js | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -36,10 +36,10 @@ var db; db = autolevel(); // Load database from folder, relative to the app root -db = autolevel('dir://data/'); +db = autolevel('dir:data/'); // Load database from folder, absolute path -db = autolevel('dir:///data/'); +db = autolevel('dir://data/'); // Use mongodb storage db = autolevel('mongodb://localhost:27017/database'); diff --git a/src/index.test.js b/src/index.test.js @@ -47,7 +47,7 @@ test('Verify memory adapter', async t => { test('Verify plain adapter', async t => { t.plan(4); - const instance = autolevel('dir://data/'); + const instance = autolevel('dir:data/'); t.equal(await instance.put('key', 'value') , undefined, 'put returns nothing'); t.equal(isBuffer(await instance.get('key')), true , 'get returns a buffer'); t.equal(await instance.get('key', {asBuffer:false}) , 'value' , 'get returns original value');