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

container-db

v1.0.8

Published

Database with embedded sockets for real-time communication

Readme

Container-DB

Database with embedded sockets for real-time communication

Container DB allows you to have more controll over your data thanks to its Container system. It also allows you to see whats happening with your data in real-time.

Containers

Containers are like boxes where Container-DB stores your data. You can have infinite boces inside a database. For example you can have three separate boxes of users with different names, one for animals, and ten for hotels.

Storing data

const {Client} = require("container-db");

const cdb = new Client ("WHERE YOU WANT YOUR DATABASE TO BE HOSTED IT NEEDS TO END WITH AN SLASH (/)")

//1- create a container to store your data
cbd.createContainer("NAME", "TYPE", "INITIAL DATA").then(res => console.log)

//2- add a field (object)

cdb.addField("NAME OF THE FIELD/OBJECT", "CONTAINER", "INITIAL DATA / OBJECT DATA").then(res => console.log)

//3- get the field added

cdb.getField("CONTAINER", "FIELD NAME").then(res => console.log)

//4- get the container

cbd.getContainer("CONTAINER").then(res => console.log)

//5- update a property of the field / object

cdb.updateField("CONTAINER", "FIELD NAME", "PROPERTY", "UPDATED DATA").then(res => console.log)

//6- delete the field

cdb.deleteField("CONTAINER", "FIELD").then(res => console.log)

//7- delete the container

cdb.deleteContainer("CONTAINER")


Antoher functions avaible:

getAllContainers()

findOne(container, property, value)

Find an element in the container with the value specified in the property specified

findAll(container, property, value)

findOneAndUpdate(container, property, value, dataToUpdate)

findOneAndDelete(container, property, value)

findAllAndDelete(container, property, value)

findAllAndUpdate(container, property, value, dataToUpdate)

push(container, field, arrayName, value)

Push the value into the array with the name arrayName that is in the object with the name field that is in the container named container

pull(container, field, arrayName, value)

pullAll(container, field, arrayName)

Clear the array

Listening to changes (Real-Time)

Cotainer-DB creates a socket in the localhost:2311 that boradcasts all the changes that the data suffers, to listen on this changes is easy

const io = require("socket.io-client")("http://localhost:2311")

//Listen when a container is created
io.on("createdContainer", (data) => {
    //Returns Container already exists || {container : ""}
})

//Listen when an object/field is added to a container
io.on("added", (data) => {
    //Returns Container does not exists || Field already exists || {"container: "", "field" : "", "data" : ""}
})

//Listen when a field/object is updated
io.on("updatedField", (data) => {
    //Returns {errors} || {"container" : "", "field" : "", "data" : "", "property" : ""}
})

//Listen when a field/object is deleted
io.on("deletedField", (data)=>{
    //Returns {errors} || {"container" : "", "field" : ""}
})

//Listen when a container is deleted
io.on("deletedContainer", (data)=>{
    //Returns {errors} || {"container" : ""}
})

//Listen when findOneAndUpdate()
io.on("foundOneAndUpdated", (data)=>{
    //Returns {errors} || {"result" : "", "field" : "", "value" : ""}
})

/*Another find events:
    foundOneAndDeleted()
    foundAllAndUpdated()
    foundAllAndDeleted()
*/

//Listen when push()
io.on("pushed", (data)=>{
    //Returns {errors} || {"field" : "", "value" : "", "array" : ""}
})

/*Another events liked pushed
    pulled
    pulledAll
*/

Container Manager

Container Manager helps yout to manage an specific container in a most easy way.

const {ContainerManager, Client} = require("container-db")
const containerManager = new ContainerManager("CONTAINER", "CLIENT")

//All the functions on the Container Managaer are the same that in the client but with the container name

Contribute

If you want to contribute go to https://github.com/svcu/Container-DB and make your contributions. Container DB is built by the community for the community.

Donations

ETH : 0xB86BF6c0519e7167a1f446F666DcE72C501F9597