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

s1mple.js

v1.0.2

Published

Shortcuts for your JavaScript Projects.

Downloads

12

Readme

s1mple.js

Make JavaScript easier.

Hello and welcome to s1mple.js Documentation.

Areas | Second Header ------------ | ------------- JSONbase | Local Databases Requirements, Structure, Commands, Usage S1ncrypt | Encryptor Requirements, Structure, Commands, Usage

Get Started

To get started with simple.js you will need to install it as a module by the following in your console :

npm install s1mple.js

Once s1mple.js is installed you can include It on your project by typing the following in your code :

const s1mple = require('s1mple.js');
// The following is depending on what you want to include :
const JSONbase = new s1mple.JSONbase('./database/JSONbase.json'); // You'd need to specify the path
const s1ncrypt = new s1mple.s1ncrypt(3); // Specify an extra number (To encrypt Further)

s1mple.js: by yaxeldragon and luis-dev

Areas :

JSONbase

Requirements (JSONbase)

In order to use this extention you will need a JSON file with an expected input {}. You will also need to define your database.

const s1mple = require('simple.js');
const JSONbase = new s1mple.JSONbase('./database/JSONbase.json');
// JSONbase.crea...

Structure (JSONbase)

This database system is organized by row, items, values. A row contains items, and each item contains a value.

"row": {
    "item": "value"
}

Commands (JSONbase)

Command | Action | ID ------------ | ------- | ----- JSONbase.addRow('Row', ['items array']); | Creates a row with all items | JB#01 JSONbase.addItem('Row', 'Item'); | Adds an item to a row. | JB#02 JSONbase.setItem('Row', 'Item', 'value'); | Sets the value of an item | JB#03 JSONbase.removeRow('Row'); | Removes a row with all Items | JB#04 JSONbase.removeItem('Row', 'Item'); | Removes an Item | JB#05 JSONbase.save(); | Saves all changes. | JB#06 JSONbase.createBackup(); | Creates a backup. | JB#07 JSONbase.saveBackup('Path'); | Saves a backup into a custom file. | JB#08 JSONbase.rowExists('Row'); | Saves a backup into a custom file. | JB#09

Usage (JSONbase)

ID: JB#01

Create a row (the base) with the following Command :

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.save();


// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": ""
}
ID: JB#02

Add an item to a Row :

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.addItem('s1mple.js', 'newItem']);
JSONbase.save();


// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": "",
    "newItem": ""
}
ID: JB#03

Set the value of an item inside a Row.

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.setItem('s1mple.js', 'classes', 'I am a class!');
JSONbase.save();


// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "classes": "I am a class!",  
    "more stuff...": ""
}
ID: JB#04

Removes a row. Including the items inside It.

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.removeRow('s1mple.js');
JSONbase.save();


// Result (JSONbase.json)
{}
ID: JB#05

Removes an Item inside a Row.

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.removeItem('s1mple.js', 'classes', 'I am a class!');
JSONbase.save();


// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "more stuff...": ""
}
ID: JB#06

Saves all stored locally on the Database.

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.save(); // Saves all changes done to JSONbase.

// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": ""
}
ID: JB#07, and JB#08

Creates a Backup.

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
JSONbase.save();
JSONbase.createBackup();
JSONbase.saveBackup('./backups/myBackup.json');

// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": ""
}

// Backup (myBackup.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": ""
}
ID: JB#09

Checks if a row exists and returns a true or false (can be used in if's statements)

// Code (index.js)
JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']); // CREATES a Row.
if (JSONbase.rowExists('commands')) { // If 'commands' row exits

    JSONbase.newItem('s1mple.js', 'Means It exists!'); // Creates a Row.
    JSONbase.save();
} else {
    JSONbase.addRow('s1mple.js', ['commands', 'classes', 'more stuff...']);
}
// PD : If it exists

// Result (JSONbase.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": ""
}

// Backup (myBackup.json)
"s1mple.js": {
    "commands": "",
    "classes": "",  
    "more stuff...": ""
}

S1ncrypt

Requirements (S1ncrypt)

In order to use this extention you will need to insert the following in your code :

const s1ncrypt = new s1mple.s1ncrypt(3);
// You can plug any NUMBER for 3, It's an extra layer of encryption.

Structure (S1ncrypt)

(S1mple.js Developers Secret)

Commands (S1ncrypt)

Command | Action | ID ------------ | ------- | ----- JSONbase.encrypt('string', 'hexa-char'); | Creates a row with all items | s1yt#01

Usage (S1ncrypt)

ID: s1yt#01

Returns an encrypted Text :

let encrypted = s1ncrypt.encrypt('MyString', 'hexa-char');
        // Don't change the method (hexa-char). That's the only one currently
console.log(`'MyString': '${encrypted}'`);

// Console Output :
> 'MyString': 'M37My138yS53St125tr120ri96in109ng90g'

Versions

1.0.2 : Made JSONbase find file route easier, Check if Items exists, and auto-fix an unexpected JSON input. Also Introducing s1ncrypt to be able to encrypt strings with only two commands.