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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jason.db

v0.1.28

Published

A JSON database

Readme

jason.db (jason's db) · CI

DO NOT USE THIS IT WAS MADE AS A JOKE

This package stores JSON data which is prone to potential corruption and data loss. I strongly suggest you do not use it. If you want an easy storage solution please take a look at enmap.

Enmap


I was bored, so I made this garbage JSON database. Don't use it unless you are just staring a project and need a temperary database. It isn't very fast and is very memory inefficient.


Example:

const jasonDB = require("jason.db");
const DB = new jasonDB("db.json", { caching: true, renameFile: false });

DB.collection("data").set("data", "value");
DB.collection("data").push("dataArray", "value");
DB.collection("data").set("object.data", "nested value");

console.log(DB.collection("data").has("data")); // true
console.log(DB.collection("data").get("data")); // value
console.log(DB.collection("data").get("data")); // ["value"]
console.log(DB.collection("data").get("object")); // { data: "nested value" }
console.log(DB.collection("data").get()); // { data: 'value', dataArray: [ 'value' ], object: { data: 'nested value' } }

DB.clear(true);
console.log(DB.collection("data").get()); // {}

Options

Options passed into the DB

| Option | Type | Default | Description | | ---------- | ------- | ------- | ------------------------------------------------------------------------- | | renameFile | boolean | true | Enable renaming the file, replacing all occurances of "json" with "jason" | | writeFile | boolean | false | Enable writing the file path, may cause random files to appear |

Options passed into the Collection

| Option | Type | Default | Description | | ------- | ------- | ------- | ---------------------------------------------- | | caching | boolean | false | Enables caching the entire json file in memory |


DB

DB.collection()

DB.collection(name)

returns - Collection

Returns a collection, if none exists with the name, it will be created.

  • name (sring) - The name of the collection.

DB.clear()

DB.clear(boolean)

returns - boolean

Returns a boolean, the success of the clear.

  • boolean (boolean) - The name of the collection.

Collection

Collection.push()

Collection.push(key, data)

returns - boolean

Returns a boolean, the success of the save.

  • key (string | number) - The key of the data.
  • data (any) - The data to push to the array.

Collection.set()

Collection.set(key, data)

returns - boolean

Returns a boolean, the success of the save.

  • key (string | number) - The key of the data.
  • data (any) - The data to save.

Collection.get()

Collection.get(key)

returns - any

Returns the data set to the key.

  • key (string | number) - The key of the data.

Collection.has()

Collection.push(key, data)

returns - boolean

Returns a boolean, if the collection has data with that key.

  • key (boolean) - The key of the data.

Contributiors

flazepe - Code for nested objects