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

@sheepsbr/jsonbinjs

v0.0.7

Published

A set of

Downloads

12

Readme

Json Storage Client Javascript 🌪🎃️

interface to store & retrieve your JSON data from the cloud.

npm install --save @sheepsbr/jsonbinjs
import {New} from '@sheepsbr/jsonbinjs';

// create a new json storage client
const jsonStorage = await New({
    host: <string>,
    port: <number>,
    insecure: <boolean>,
    accessKey: <string>,
    readTimeoutInSeconds: <number>,
});

// Get Documents
const docs = await jsonStorage.GetDocuments({
    query: {
        "number[age].gt": 20
    },
    page: {
        offset: 0,
        limit: 100
    }
});

// Get Document
const doc = await jsonStorage.GetDocument({
    uniqueId: "63b44f955c0f62ed013a1046"
});

// Count Documents
const count = await jsonStorage.CountDocuments({
    query: {}
});

// Stream Documents
await jsonStorage.GetStreamDocuments({query: {}}, function (document) {
    console.log(document._id);
});

// Push Documents 
// id is required
const push = await jsonStorage.PushDocuments({
    documents: [
        {
            "id": "63b4b54b6c20f0c2b73ca70c",
            "isActive": false,
            "balance": "$1,387.96",
            "picture": "http://placehold.it/32x32",
            "age": 32,
            "eyeColor": "brown",
            "name": "Eugenia Pace",
            "email": "[email protected]",
            "phone": "+1 (955) 516-3544",
            "latitude": -78.403322,
            "longitude": -178.773843,
            "tags": [
                "nulla",
                "qui"
            ]
        },
        {
            "id": "63b4b54b81613993d7366e1c",
            "isActive": false,
            "balance": "$2,208.97",
            "picture": "http://placehold.it/32x32",
            "age": 37,
            "eyeColor": "green",
            "name": "Jamie Walters",
            "gender": "female",
            "company": "ZIGGLES",
            "email": "[email protected]",
            "phone": "+1 (966) 545-3760",
            "latitude": -43.161159,
            "longitude": 119.360297,
            "tags": [
                "ad",
                "dolore"
            ]
        }
    ]
});

// Patch Documents
// id is required
 const patch = await jsonStorage.PatchDocuments({
    documents: [
        {
            "id": "63b4b54b6c20f0c2b73ca70c",
            "guid": "b4c0f674-ffeb-4265-b727-630b988e8bf4"
        },
        {
            "id": "63b4b54b81613993d7366e1c",
            "guid": "09518ee9-ae99-4d3c-ac41-cb4e6476d069"
        }
    ]
});

// Remove Documents
const removes = await jsonStorage.DeleteDocuments({
    uniqueIds: ['63b4b54b6c20f0c2b73ca70c', '63b4b54b81613993d7366e1c']
}); 
                        
// Remove Documents containing a prefix in ID 
const removes = await jsonStorage.DeleteDocuments({
    prefix: '63b4b54b6c20f0c2b73ca70c';
});


// About
// information about the server
const about = await jsonStorage.About();

// Ping
// ping the server
const ping = await jsonStorage.Ping();

// check connection
jsonStorage.IsConnected();
                        
// Disconnect                       
jsonStorage.Disconnect();

Create instance with pool

const {JsonBinPool, JsonBin } from '@sheepsbr/jsonbinjs';

const CONFIG = {
    host: <string>,                  // required   
    port: <number>,                  // required
    insecure?: <boolean>,            // optional default true
    accessKey: <string>,             // required   
    readTimeoutInSeconds?: <number>, // optional default 30
    poolMin?: <number>,              // optional default 1
    poolMax?: <number>               // optional default 2
};

const jsonbin = new JsonBinPool(CONFIG);
// Examples:
// use jsonbin reference in methods
const ping = await jsonbin.exec( (bin: JsonBin) => bin.Ping() );

// get server version                                
const version = await jsonbin.exec( async (bin: JsonBin) => {
    const about = await bin.About();
    return about.version;
} );


// destroy pool
await jsonbin.destroyQuietly();