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

higgle

v0.0.2

Published

A database system

Readme

higgle - A Tiny JavaScript Database System

Build Status

So, yeah, it's not complete yet, but it can support simple queries and has an API similar to mongodb.

var db = new Higgle();
db.createCollection("Books");
var esums = db.collection("Books");
esums.insert({'DOC': 1,
              'Principal':'Blue',
              'Dean of Strapping':'Newlyn Joseph',
              'IPs':[5234, 7432]
             });
esums.insert({'DOC': 2,
              'Harry Potter':'JK Rowling',
              'Swag':'Newlyn Joseph'
             });
esums.insert({'DOC': 3,
              'Principal':'Blue',
              'Dean of Strapping':'Newlyn Joseph',
              'IPs':[5234, 7432]
             });
var queryresults = esums.find({'Principal':'Blue'});
console.log("Matching documents");
console.log(queryresults);

##How To Install If you're working on the client side, just include the script higgle.js. This will provide you with the Higgle object attached to the window object.

<script src="higgle.js"></script>
<script src="your_code.js"></script>

On Node.js just require the module after installing it via NPM.

$ npm install higgle
// On Node.js you must require the module in order to use the Higgle object
var Higgle = require('higgle');

##Documentation ###Creating a Database Using Higgle is super simple. The Higgle object represents your entire database. You can create an instance of one as follows:

var db = new Higgle();  // It is common convention to name your database object 'db'

###Creating a Collection Within a database you can have one or more collections. Collections are a group of JSON documents. You can create a collection by calling the following method on your database object.

db.createCollection("People");

All you must specify as an argument is a string which will be the name of the collection. You can now grab a handle to the collection by calling the following method on your database object.

var people = db.collection("People");

All you must specify as an argument is the name of the collection (the same name you used to create the collection). The variable people is a collection object which you can utilize to modify your database. ###Adding Data Adding data is super simple. Just call the following method on the collection object and specify the JSON document you want to add to the collection.

people.insert({'name': 'wiley',
               'age': 35
             });
people.insert({'name': 'smith',
               'age': 16
             });

The above code adds two JSON documents to the collection known as people. ###Querying Data ####Simple Queries Querying data is also super simple. Every query returns an array full of documents that matched the query. To perform a query call the following method on the collection object:

// This query will find all documents in the collection known as
// 'people' that have the string 'wiley' paired with the key 'name'
var queryresults = people.find({'name':'wiley'});

// You can also query with multiple JSON keys
var queryresults = people.find({'name':'wiley',
                                'age': 13
                               });

The queryresults object is an array with all the JSON documents that matched the query. ####Conditional Queries Say for example we want to know all the people who can legally drink. To perform such a query we would do the following:

// Find all documents where the key of 'age' has a value greater than 21
var queryresults = people.find({ 'age': great(21) });

Similarly, if we want to find all the documents in which the key of age has a value that is less than 21 we could perform the following query:

// Find all documents where the key of 'age' has a value less than 21
var queryresults = people.find({ 'age': less(21) });

Similarly, if we want to find documents with a key of age that takes on a certain range of values, we can do so:

// Find all documents where the key of 'age' has a value in between 6 and 24
var queryresults = people.find({ 'age': range(6, 24) });