A community and a collection of Node.js modules for creating transparent databases.levellevelupleveldownmemdownlevel-js
Level is a community and a collection of Node.js modules for creating transparent databases. A solid set of primitives enable powerful databases to be built in userland. They can be embedded or networked, persistent or transient - in short, tailored to your needs.
At the core of Level are simple key-value stores that follow the characteristics of LevelDB. LevelDB is a key-value store built by Google, used in Google Chrome and many other products. It supports arbitrary byte arrays as both keys and values, singular reads and writes, batched writes and bi-directional iterators. LevelDB sorts entries lexicographically by keys which, when combined with ranged iterators, makes for a very powerful query mechanism.
Level utilizes idiomatic Node.js interfaces like
offers a rich set of data types through
allows for extensions like
to split a database into evented sections. Underlying stores can
be easily swapped to target a wide range of runtime environments.
The most common store is
which is a pure C++ binding to LevelDB.
Many alternatives are available
in the browser or
for an in-memory store.
module is the recommended way to get started. Visit
to discover more modules. See our
to find out what we're working on. If you need help - technical,
philosophical or other - feel free to open an issue in
or a more specific repository.
level@5, the above code works in Node.js, Electron and browsers!
Most databases are mysterious black boxes. Level provides a highly transparent, light-weight foundation for you to compose higher-level features on top of. First and foremost, it offers simple key-value stores. No SQL, schemas or indexes are involved - unless you want to!
Swap out the underlying store as needed. Many stores are available. This allows you to use the same API across different runtime environments.
Projects in the Level organization are OPEN Open Source. Individuals making significant and valuable contributions are given commit-access to contribute as they see fit.
More complex and opinionated features such as replication, map-reduce and pub-sub can be - and hundreds are! - written in userland and published on npm. This is actively encouraged to keep the core of Level lean.
Sorted By Keys
Level databases store their entries by keys, usually sorted lexicographically. This is one of the main distinguishing features amongst similar data storage libraries and lends itself to flexible namespacing and fast range queries.
First-class Binary Support
Both keys and values are treated as simple arrays of bytes. Their content can be anything from ASCII strings to binary blobs.
Embeddable & Networkable
Most Level databases are meant to be embedded in an application. If so desired, they can be networked by adding protocols such as HTTP, TCP or UDP to your process.
- OS X
Open an issue in
community or a more specific repository.
You can also visit us on irc.freenode.net in
Please note that this channel is not affiliated with Google LevelDB. We may open a new channel soon to clarify this point.