API Reference

LMDB

Node.js bindings for LMDB, offering a fast embedded key-value store with ACID transactions and zero-copy reads.

Official Documentation ↗
CompatibilityThis documentation covers version v3.0. Check the official docs for the latest API surface.

Installation

npmnpm install lmdb

Methods

lmdb-js wraps the memory-mapped LMDB engine, giving synchronous and asynchronous access to ordered data.

Key Features

  • ACID transactions with reader isolation
  • Zero-copy reads of memory-mapped values
  • Range queries and duplicate value support

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

Errors

The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/kriszyp/lmdb-js@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:50:43.644Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.

FAQ

How is LMDB different from Level?
LMDB uses memory-mapped files and MVCC, so reads are often zero-copy and never block writers. Level is a pluggable abstraction over several engines.
Can I use it from multiple processes?
Yes. LMDB supports multiple readers and a single writer across processes on the same host, serialized by the OS lock.
Do values need to be Buffers?
Not necessarily. lmdb-js serializes objects with its own encoder, and enabling compression stores them more compactly.