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

salvis

v1.3.5

Published

A Node Module for saving and loading data.

Readme

Salvis

A Node Module for saving and loading data.

Installation

npm install salvis

Storage

Storage is what is considered as the Data Base it will be what you use to storage data inside.

const Salvis = require("salvis");

const storage = new Salvis("player_data");

// const storage = new Salvis("player_data", { path: "./src/storage/players" /* Default ./.data/storage_id */, autosave: false /* Default true */, autoload: false /* Default true */, prettify: true /* Default false */ });

The storage variable is what is used to create boxes inside that then you can store data with.

Storage Options

  • Path (Default "./.data/storage_id") Changes the path at which the files are stored.

  • Autosave (Default "true") Saves to the files whenever a modification is made to a box.

  • Autoload (Default "true") Runs storage.load(); at the initiation of the class Salvis.

  • Prettify (Default "false") Changes the way the files are stored from one liner JSON to a pretty version of a more readable JSON (Takes more storage space).

Boxes

Boxes are the components that you use to save data for example coins in a game.

//...
const coins = storage.box("coins", 0 /* Default value */);
const stamina = storage.box("stamina", 100 /* Default value */);
const rank = storage.box("rank", "guest");

Boxes have alot of functionalities which are the main data storage.

//...
coins.setup("subie") // coins.set("subie", 0 /* Default value */);
const user = coins.get("subie");

if (coins.has("John")) console.log("We have John");

coins.delete("John"); // We don't like John

coins.set("hacker", 128390128390);

const users = coins.keys();
const moneys = coins.values();

Saving/Loading

Saving and loading is as simple as modifying the data.

Autosave is saving to file on every edit to the data. Autoload is loading the files at launch.

Both autosave and autoload are auto set to true so using storage.load() and storage.save() is not needed.

storage.save(); // Should be done after every modification if autosave is disabled
storage.load(); // Should be done after declaring the storage variable if autoload is disabled

Setup

You can setup a key with the default box values with the following two methods.

  • Global Setup This sets up the key to every box.
//...
storage.setup("Newbie");
  • Per Box Setup This sets up the key to a single box.
//...
rank.setup("Newbie");