@nimiq/jungle-db
Advanced tools
Comparing version 0.9.23 to 0.10.0
{ | ||
"name": "@nimiq/jungle-db", | ||
"version": "0.9.23", | ||
"version": "0.10.0", | ||
"main": "dist/lmdb.js", | ||
@@ -10,3 +10,2 @@ "unpkg": "dist/indexeddb.js", | ||
"test": "jasmine && karma start", | ||
"test-leveldb": "jasmine --config=spec/support/leveldb-jasmine.json", | ||
"test-lmdb": "jasmine", | ||
@@ -30,7 +29,2 @@ "test-indexeddb": "karma start", | ||
}, | ||
"optionalDependencies": { | ||
"level-sublevel": "^6.6.5", | ||
"leveldown": "^5.1.1", | ||
"levelup": "^4.1.0" | ||
}, | ||
"devDependencies": { | ||
@@ -43,3 +37,3 @@ "@babel/cli": "^7.4.4", | ||
"@babel/runtime": "^7.4.4", | ||
"browserify": "^16.1.1", | ||
"browserify": "^17.0.0", | ||
"codecov": "^3.7.1", | ||
@@ -49,3 +43,3 @@ "esdoc": "^1.0.4", | ||
"esdoc-standard-plugin": "^1.0.0", | ||
"eslint": "^6.0.1", | ||
"eslint": "^8.9.0", | ||
"gulp": "^4.0.2", | ||
@@ -55,8 +49,8 @@ "gulp-babel": "^8.0.0", | ||
"gulp-eslint": "^6.0.0", | ||
"gulp-sourcemaps": "^2.6.0", | ||
"gulp-sourcemaps": "^3.0.0", | ||
"gulp-uglify": "^3.0.0", | ||
"gulp-uglify-es": "^1.0.1", | ||
"gulp-uglify-es": "^3.0.0", | ||
"gulp-watch": "^5.0.0", | ||
"istanbul": "^1.1.0-alpha.1", | ||
"jasmine": "^3.99.0", | ||
"jasmine": "^4.0.2", | ||
"jasmine-core": "*", | ||
@@ -67,4 +61,4 @@ "jasmine2-custom-message": "^0.9.0", | ||
"karma-cli": "*", | ||
"karma-coverage": "^1.1.1", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"karma-coverage": "^2.2.0", | ||
"karma-firefox-launcher": "^2.1.2", | ||
"karma-jasmine": "*", | ||
@@ -71,0 +65,0 @@ "karma-safari-launcher": "^1.0.0", |
# jungle-db [![Complete Check](https://github.com/nimiq/jungle-db/actions/workflows/build.yml/badge.svg)](https://github.com/nimiq/jungle-db/actions/workflows/build.yml) | ||
JungleDB is a simple database abstraction layer for NodeJS (LMDB or LevelDB) and browsers (IndexedDB) supporting advanced features such as transactions with read-isolation and secondary indices. | ||
JungleDB is a simple database abstraction layer for NodeJS (LMDB) and browsers (IndexedDB) supporting advanced features such as transactions with read-isolation and secondary indices. | ||
@@ -22,6 +22,4 @@ ## Quickstart | ||
* NodeJS LMDB: `lmdb.js` | ||
* NodeJS LevelDB: `leveldb.js` (*not recommended*) | ||
In NodeJS, you can use `var JDB = require('@nimiq/jungle-db');` to include the LMDB backend. | ||
In order to use the LevelDB backend, `var JDB = require('@nimiq/jungle-db/dist/leveldb.js');` has to be used. Note that the usage of LevelDB is *not recommended*. LMDB should be preferred for most use cases. | ||
@@ -117,3 +115,3 @@ **Note on Edge browser:** At the time of writing, Edge does not provide full IndexedDB support. | ||
decode: (value, key) => yourDecodeFunction(value, key), | ||
valueEncoding: JungleDB.JSON_ENCODING // This property is only used for levelDB and LMDB. | ||
valueEncoding: JungleDB.JSON_ENCODING // This property is only used for LMDB. | ||
} | ||
@@ -125,3 +123,3 @@ }); | ||
While the default JSON encoding is sufficient for most cases, it can be used to optimise storage in case only binary data is stored. | ||
There is also the possibility to define different backend specific encodings for LevelDB and LMDB using `leveldbValueEncoding` and `lmdbValueEncoding`. | ||
There is also the possibility to define different backend specific encodings for LMDB using `lmdbValueEncoding`. | ||
Possible backend specific encodings are: | ||
@@ -189,11 +187,2 @@ * `JungleDB.JSON_ENCODING` for JSON objects | ||
#### Run LevelDB Benchmarks | ||
Start the example by running `benchmark/leveldb/index.js`. | ||
```bash | ||
cd benchmark/leveldb/ | ||
node index.js | ||
``` | ||
#### Run LMDB Benchmarks | ||
@@ -213,3 +202,2 @@ | ||
- `npm run test-indexeddb` or `yarn test-indexeddb` runs the testsuite in your browser only. | ||
- `npm run test-leveldb` or `yarn test-leveldb` runs the LevelDB testsuite for NodeJS only. | ||
- `npm run test-lmdb` or `yarn test-lmdb` runs the LMDB testsuite for NodeJS only. | ||
@@ -221,3 +209,3 @@ | ||
#### Build | ||
Executing `npm run build` or `yarn build` concatenates all sources into `dist/{indexeddb,leveldb,lmdb}.js` | ||
Executing `npm run build` or `yarn build` concatenates all sources into `dist/{indexeddb,lmdb}.js` | ||
@@ -224,0 +212,0 @@ ## Contribute |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
2061453
213