From a0f6ace9de9144f536ed5cccb995f0dabe1abc95 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 26 May 2019 12:05:08 +0300 Subject: [PATCH] Tweak README.md and package description (#112) --- CONTRIBUTORS.md | 2 +- README.md | 31 +++++++++++++++++++++++-------- package.json | 7 ++----- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index eece5a82..ad0f4437 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -4,11 +4,11 @@ | :---------------------- | :----------------------------------------------------- | :----------------------------------------------------------------------- | | **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) | | **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) | +| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | | **David Björklund** | [**@kesla**](https://github.com/kesla) | [**@david_bjorklund@twitter**](https://twitter.com/david_bjorklund) | | **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) | | **Yichao 'Peak' Ji** | [**@peakji**](https://github.com/peakji) | | | **Mathias Buus** | [**@mafintosh**](https://github.com/mafintosh) | [**@mafintosh@twitter**](https://twitter.com/mafintosh) | -| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | | **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) | | **Dominic Tarr** | [**@dominictarr**](https://github.com/dominictarr) | [**@dominictarr@twitter**](https://twitter.com/dominictarr) | | **Raynos** | | | diff --git a/README.md b/README.md index 5bb7d381..f9c323f0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # rocksdb -> A Low-level Node.js RocksDB binding +> A low-level Node.js RocksDB binding. An [`abstract-leveldown`](https://github.com/Level/abstract-leveldown) compliant store. [![level badge][level-badge]](https://github.com/Level/awesome) [![npm](https://img.shields.io/npm/v/rocksdb.svg?label=&logo=npm)](https://www.npmjs.com/package/rocksdb) @@ -13,18 +13,32 @@ [![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) [![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors) -**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md). +## Table of Contents + +
Click to expand + +- [Introduction](#introduction) +- [Supported Platforms](#supported-platforms) +- [API](#api) +- [Contributing](#contributing) +- [Donate](#donate) +- [License](#license) + +
-`rocksdb` is based on the [LevelDown](https://github.com/Level/leveldown) code, which was extracted from [LevelUP](https://github.com/Level/levelup) and now serves as a stand-alone binding for LevelDB. The native code in `rocksdb` is based on [Facebooks fork of LevelDB](https://github.com/facebook/rocksdb). +## Introduction -It is **strongly recommended** that you use LevelUP in preference to `rocksdb` unless you have measurable performance reasons to do so. LevelUP is optimised for usability and safety. Although we are working to improve the safety of the `rocksdb` interface it is still easy to crash your Node process if you don't do things in just the right way. +This module closely follows [`leveldown`](https://github.com/Level/leveldown) and implements the same API. The difference is that `leveldown` is a binding for [LevelDB](https://github.com/google/leveldb) while `rocksdb` is a binding for [RocksDB, Facebook's fork of LevelDB](https://github.com/facebook/rocksdb). + +It is **strongly recommended** that you use `levelup` in preference to `rocksdb` unless you have measurable performance reasons to do so. `levelup` is optimized for usability and safety. Although we are working to improve the safety of the `rocksdb` interface it is still easy to crash your Node process if you don't do things in just the right way. + +**If you are upgrading:** please see [UPGRADING.md](UPGRADING.md). - ## Supported Platforms We aim to support _at least_ Active LTS and Current Node.js releases, Electron 4.0.0, as well as any future Node.js and Electron releases thanks to [N-API](https://nodejs.org/api/n-api.html). Because N-API has an experimental status in node 6 and early 8.x releases, the minimum node version for `rocksdb` is `8.6.0`. -The `rocksdb` npm package ships with prebuilt binaries for popular 64-bit platforms ~~as well as ARM, Android and Alpine (musl)~~ and is known to work on: +The `rocksdb` npm package ships with prebuilt binaries for popular 64-bit platforms and is known to work on: - **Linux** (including ARM platforms such as Raspberry Pi and Kindle) - **Mac OS** @@ -36,10 +50,11 @@ When installing `rocksdb`, [`node-gyp-build`](https://github.com/prebuild/node-g If you don't want to use the prebuilt binary for the platform you are installing on, specify the `--build-from-source` flag when you install. If you are working on `rocksdb` itself and want to re-compile the C++ code it's enough to do `npm install`. - ## API -`rocksdb` implements the same API of [LevelDown](https://github.com/Level/leveldown#api). +Please refer to [`leveldown`](https://github.com/Level/leveldown#api) for API documentation. The `db.open(options, callback)` method of `rocksdb` has a few additional options: + +- `readOnly` (boolean, default `false`): open database in read-only mode. ## Contributing diff --git a/package.json b/package.json index 1dc5f2aa..44081d91 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "rocksdb", "version": "3.1.0", - "description": "A Node.js RocksDB binding, a backend for LevelUP", + "description": "A low-level Node.js RocksDB binding", "license": "MIT", "main": "leveldown.js", "scripts": { @@ -53,10 +53,7 @@ ] }, "hallmark": { - "community": "level-community", - "ignore": [ - "README.md" - ] + "community": "level-community" }, "gypfile": true, "repository": {