abstract-leveldownstore for Node.js and browsers.
If you are upgrading: please see the upgrade guide.
const levelup =const memdown =const db =db
Your data is discarded when the process ends or you release a reference to the store. Note as well, though the internals of
memdown operate synchronously -
levelup does not.
Keys and values can be strings or Buffers. Any other key type will be irreversibly stringified. The only exceptions are
undefined. Keys and values of that type are rejected.
const db =db
If you desire non-destructive encoding (e.g. to store and retrieve numbers as-is), wrap
encoding-down. Alternatively install
level-mem which conveniently bundles
encoding-down. Such an approach is also recommended if you want to achieve universal (isomorphic) behavior. For example, you could have
leveldown in a backend and
memdown in the frontend.
const encode =const db =db
memdown store is backed by a fully persistent data structure and thus has snapshot guarantees. Meaning that reads operate on a snapshot in time, unaffected by simultaneous writes.
In addition to the regular
npm test, you can test
memdown in a browser of choice with:
npm run test-browser-local
To check code coverage:
npm run coverage
Level/memdown is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the Contribution Guide for more details.
Cross-browser Testing Platform and Open Source ♥ Provided by Sauce Labs.