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

crud-suit

v1.0.19

Published

This package gives you a simple CRUD service for any initial development, or prototyping for web applications.

Downloads

246

Readme

CRUD-suit

This package gives you a simple CRUD service for any initial development, or prototyping for web applications.

Package Features:

  1. Saving to LocalStorage.
  2. Synchronous, or asynchronous operation.
  3. Total changes Array - the package will record any action done by the service,
    and will give access to that Array of changes. Each action will be timestamped.
  4. Timestamp and updatedStamp.

How to use

npm install crud-suit
import CRUD from './node_modules/crud-suit/index.js'
const crudService = new CRUD([data | Array], [save to LocalStorage | boolean], [name of key in LocalStorage | string], [asynchronous CRUD | boolean])

Methods

  1. query - will return the data Array
    When calling this function, a timestamp key will be generated on each object in the Array.
crudService.query()
  1. getById - will take an _id and will return the object matching that _id
crudService.getById(entityId)
  1. remove - will take _id and splice it from the data Array. will return a success message.
crudService.remove(entityId)
  1. getEmptyItem - will return an empty item based on the first object in your data Array
crudService.getEmptyItem()
  1. add - will take a new data object, add it to the data Array with an _id,
    and will return the new object that was created with the _id.
    When calling this function, a timestamp key will be generated on the added object.
crudService.add(entity)
  1. update - will find an object inside the data Array and replace it with the new object.
    Will return the _id of updated item.
    When calling this function, an updatedStamp key will be created on each object in the Array.
crudService.update(entity)
  1. undoAction - will enable you to undo last actions based on snapShot of your data before any crud action.
    It will return the last snapShot of your data before the changes. This method will not save the snapShot Array to localStorage.
crudService.undoAction()
  1. getActivities - will keep a record of all actions done by the service and timestamp it. It will return an activities Array with objects describing the action.
crudService.getActivities()

Parameters

new CRUD([data | Array], [save to LocalStorage | boolean], [name of key in LocalStorage | string], [asynchronous CRUD | boolean])

First parameter - data | Array

How to insert your data

The CRUD class instance would take a data Array, containing object items as its first parameter.

In order to ensure all methods are working properly, do not insert your data with id key.
_id key for every object will be generated by the CRUD instance.

Second & third parameter - LocalStorage | boolean, key | String

working with LocalStorage

LocalStorage will store a Key-Value pair. In order to save your data to local storage, you will need two parameters. The first parameter is a boolean in order to determine whether the information

will be kept or not, to LocalStorage. The third parameter is a string to determine the key for the localStorage collection.

Fourth parameter - asynchronous | boolean

Working synchronously and asynchronously

This parameter will take a boolean value to determine whether your CRUD instance will
return a simple data format or a Promise based format.