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

basilisk

v0.3.9

Published

A value library for Javascript - makes immutability simple to work with.

Downloads

7

Readme

Basilisk is a value library for Javascript. It allows you to create immutable data in a familiar way, and to derive new versions from that data.

Full documentation is available on readthedocs


var Person = basilisk.makeStruct(['name', 'age']),
    example = new Person({ name: 'Joe', age: 32 }),
    older = example.with_('age', example.age + 2);

Making code which updates deeply nested structures simple and clear is library's main aim.

// we make a quick alias, to reduce clutter in the code.
var b$ = basilisk.query,

    Person = basilisk.makeStruct(['name', 'age', 'addresses']),
    Address = basilisk.makeStruct(['city', 'country']),

    example = new Person({
        name: 'Joe',
        age: 32, 

        addresses = basilisk.Vector.from([
            new Address({ city: 'London', country: 'United Kingdom' }),
            new Address({ city: 'Cape Town', country: 'South Africa' })
        ])
    }),
    example2, example3;

// first we create a new object, with a US address added.

example2 = b$.swap(example, ['addresses'], function (current) {
    return current.push(new Address({ city: 'Boston', country: 'USA' }));
});

// and if we have to replace a part of that new address.

example3 = b$.replace(example2, ['addresses', b$.at(2), 'city'], 'New York');

What's included

  • Structs with new-version helpers.
  • Persistent data structures (Vector, HashMap, StringMap) with a Javascript flavor.
  • A Query/Update utility to make deep changes in a data store easy to understand.

Examples

There is a simple example application called Listicle.

Documentation

Read all about it on readthedocs.

Installing Basilisk

Note that you need to have an ES5 Shim in place to use Basilisk on older browsers.

  • Bower: bower install basilisk
  • Node: npm install basilisk

Contributions

Contributions are very welcome! Basilisk is MIT Licensed, so you can use Basilisk in your applications without worry.

Inspired by

Basilisk is heavily inspired by Rich Hickey's talks.