npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

levelable

v0.4.3

Published

Builds on sublevel and multilevel to expose a leveldb over the network

Readme

levelable Build Status Dependencies

Builds on sublevel and multilevel to expose a leveldb over the network

## Getting Started

npm i -S levelable

Usage

Levelable is only just more than a convenience wrapper around multilevel so functionality its usage is the same.

Create the levelable object and use it to create a server:

var level = Levelable({
    port: 3000,
    path: '/.db/leveller.db'
});

level.listen()
    .then( server => {
        // ...
    })
    .catch( onErr );

Then create a client connected to that server:

level.connect()
    .then( con => {
        con.client.put( 'foo', { foo: 'bar' }, ( err ) => {
            con.client.get( 'foo', ( err, res ) => {
                // res = { foo: 'bar' }
            });
        });
    })
    .catch( onErr );

ES6?

Yep, its written in ES6 and uses babel to transpile so if you’ve installed via npm then its good to go.

If you want to compile it yourself then its not much of a chore:

git clone [email protected]:mattstyles/levelable.git && cd $_
npm i
npm run build

There’s also a watch task if you’re in the mood to hack.

There’s a modest set of tests so feel free to hack away, use npm test to run those tests.

API

new Levelable( opts )

{
    port: <Number>::?optional,
    host: <String>::?optional
    socket: <String>::?optional,
    db: <Level>::optional,
    path: <String>::?optional,
    sublevels: <Array:String>::optional
}

port the port to listen at, either socket or port is required

host the host to listen at, defaults to localhost

socket the socket address, either socket or port is required

db a leveldb instance, e.g. new Level() or Sublevel()

path the location on disk of the db, unnecessary if the db is passed in but is used to find the manifest

sublevels array of sublevels in the db

Multilevel uses a manifest file to ensure consistency when plugins (such as sublevel) extend the levelup api and levelable uses the path option to find this manifest. For accessing the root database the manifest is unnecessary, otherwise you would need the manifest created by the server, or path to an identical manifest, or pass a manifest when attempting to connect.

levelable.sublevel( sublevelid )

Creates a new sublevel in the db. Sublevel names are also stored in the db under the meta sublevel.

levelable.listen()

Creates a server listening on the port or socket passed in at creation time. Resolves with the server instance.

levelable.connect( sublevelid , opts )

{
    manifest: <Object>
}

manifest the manifest object to use to connect to the server

Connects to the database on the port or socket passed in at creation time, optionally connecting to a specific sublevel. Resolves with an object containing both the multilevel client and the raw socket it is connected with.

Contributing

Feel free to hack away, there’s (at least) a couple of things that would be really beneficial if this module handled for you.

npm i
npm test
npm watch

License

WTFPL