rocksdb-native 0.1.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -2
  2. package/package.json +10 -4
package/README.md CHANGED
@@ -1,13 +1,27 @@
1
1
  # rocksdb-native
2
2
 
3
+ <https://github.com/holepunchto/librocksdb> bindings for JavaScript.
4
+
3
5
  ```
4
- npm install rocksdb-native
6
+ npm i rocksdb-native
5
7
  ```
6
8
 
7
9
  ## Usage
8
10
 
9
- ``` js
11
+ ```js
10
12
  const RocksDB = require('rocksdb-native')
13
+
14
+ const db = new RocksDB('./example.db')
15
+
16
+ const b = db.batch()
17
+
18
+ b.add('hello', 'world')
19
+ await b.write()
20
+
21
+ const p = b.add('hello')
22
+ b.read()
23
+
24
+ console.log(await p)
11
25
  ```
12
26
 
13
27
  ## License
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "rocksdb-native",
3
- "version": "0.1.1",
4
- "description": "JavaScript bindings for RocksDB",
5
- "main": "index.js",
3
+ "version": "1.0.0",
4
+ "description": "librocksdb bindings for JavaScript",
5
+ "exports": {
6
+ ".": "./index.js",
7
+ "./package": "./package.json"
8
+ },
6
9
  "files": [
7
10
  "index.js",
8
11
  "binding.c",
@@ -14,7 +17,10 @@
14
17
  ],
15
18
  "addon": true,
16
19
  "scripts": {
17
- "test": "standard && bare test.js && node test.js"
20
+ "test": "npm run lint && npm run test:bare && npm run test:node",
21
+ "test:bare": "bare test.js",
22
+ "test:node": "node test.js",
23
+ "lint": "standard"
18
24
  },
19
25
  "repository": {
20
26
  "type": "git",