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

dphelper

v2.6.4

Published

dphelper devtools, data management for developers by Dario Passariello

Downloads

1,888

Readme

dphelper

dpHelper

Manager | DevTools by Dario Passariello (c)

version downloads

jQuery Javascript React TypeScript

Node.js Jest ESLint webpack

Snik Snik

GitBook

Table of Contents

  1. About
  2. Installation
  3. Live Demo
  4. Documentation
    1. State
    2. Store
    3. Session
    4. Observer
    5. useObserver
  5. Security

About

dpHelper is a precise and complete collection of 190+ tools ready to use in all web/SaaS and enterprise applications. State and Store Management are now easy, accessible everywhere in your application, including Ajax or React apps, without the need for extra files.

  1. Single Source of Truth: The application's entire state is held within a single object in one store, ensuring consistent and accessible state management throughout the app.

  2. State is flexible: State changes are facilitated exclusively through actions. These actions, which are straightforward JavaScript objects, delineate what has occurred. This methodology ensures that state changes remain predictable.

  3. Changes are made with proxy handle function: To define state changes, dpHelper employs pure functions as intermediaries. These functions accept the current state as input and produce a new state as output, ensuring predictability and ease of testing in the system.

Example in React

import { useEffect } from 'react';
import 'dphelper';

  function App() {
    // Store a value in the state
    state.test = 'Hello, World!';

    // Use the stored value in a React component
    useEffect(() => {
      console.log("You can recall from all pages: " + state.test); // Output: "Hello, World!"
    }, []);

    return (
      <div>
        <h1>{state.test}</h1>
      </div>
    );
  }

export default App;

Install

Install dpHelper.

npm i dphelper --save-dev

or update:

npm i dphelper@latest --save-dev

Use it in the main root file (and only there):

import "dphelper";

or

require("dphelper");

Install for EJS or Other Types of Projects (like HTML)

Note: You don't need to use npm install in this case, or you will get an error.

<script src="https://cdn.jsdelivr.net/npm/dphelper@latest"></script>

Live Demo

https://tests.a51.dev/

You can see an HTML version where dpHelper and LayerPro work together seamlessly. dpHelper is compatible with a variety of frontend libraries, including:

  • HTML
  • React
  • Vue
  • And any other frontend library

Documentation

You can see:

You can see more tutorials, information, and examples about dpHelper clicking here.

State

Using the "state"

You can use the state function to store and reuse data throughout your application. Similar to other state managers, you can save state information in JSON format and access it easily in various contexts, including React useEffect and/or dispatch.

For example, you can store a value like this: state.test = 'I am ready' and then retrieve it later using state.test.

example:

You can use the browser's devtools console and type " state.test = 'I am ready' ". Every time you want to use 'test' values, you need just recall state.test.

// Set a state
state.test = "I am ready" *

// Get the state
state.test *

// List all states
state.list // or just "state" to see the proxy

// Lock a state from edit (Only for Objects or Array)
state.test.lock() *

// Remove a state
state.remove("test")

// Remove all states
state.removeAll()

*["test" is only an example]

Observer

Note: Observer works only with states. Stores are excluded at the moment.

If you want to run a function every time a state changes, you can use:

/**
* Observer is a non-cumulative listener,
* triggered from customEvent / dispatch from state
* @parameters
* [ state | store, function ]
*/
observer( "state.test", () => alert("Test Changes to: " + state.test) )
          |__________|  |___________________________________________|
          State: string                   Function

PS: you need to use the name of state | store as string

You can use it everywhere. Works like "useState" in React but with more flexibility (use one observer for each state!).

Example

import 'dphelper';

// Use the observer to log the changing state value
observer(
  'state.count',
  () => console.log("State changed: ", state.count)
);

// Store a value in the state that changes every 5 seconds
setInterval(() => state.count = Date.now(), 5000);

NOTE: In some cases you need to wrap inside and useEffect in React to avoid multiple observers

Another Simple Example

import 'dphelper';

// Set a state
state.myData = 'Hello, world!';

// Retrieve the state
console.log(state.myData); // Output: Hello, world!

// Observe state changes
observer('myData', () => {
  console.log('myData has changed to:', state.myData);
});

// Change the state
state.myData = 'New value';

useObserver

import 'dphelper';

// Use the useObserver to log the changing state value
useObserver(
  () => console.log("State changed: ", state.count)
  , 'state.count'
);

// Store a value in the state that changes every 5 seconds
setInterval(() => state.count = Date.now(), 5000);

Store

Persistent Storage with dpHelper

When using dpHelper for permanent storage, you should use the store, which stores data persistently across sessions.

Important Security Note

  1. Use store for persistent storage: If you want to store data permanently, use store to ensure it is saved in localStorage.

  2. Remove data when necessary: To maintain security, remove stored data when it is no longer needed, such as during logout.

  3. Remove all stored data: Use store.removeAll() to securely remove all stored data from your application.

// Set a store:
store.set("test", { test: "test" })

// Get a store:
store.get("test") // Output: { test: "test" }

// Remove a store:
store.remove("test") // Output: "ok"

// Remove all stores:
store.removeAll() // Output: "ok"

2. Example in React

import { useEffect } from 'react';
import 'dphelper';

function App() {

  // Store a value in the store (persistent storage)
  store.set(
    'user',
    {
      name: 'John Doe',
      age: 30
    }
  );

  // Use the stored value in a React component
  useEffect(
    () => {
      console.log(store.get("user")); // Output: { name: "John Doe", age: 30 }
      $("#name").text(store.get("user").name)
    }, []
  );

  // Remove all stored data if necessary
  // store.removeAll();

  return (
    <div>
      <h1 id="name">...</h1>
    </div>
  );
}

export default App;

session

Similar to store but it's removed when you close the browser. For more performance it's better to use state over session. State is global and access to data is more faster and not require the time to resolve promises.

// Set a store:
store.set("test", { test: "test" })

// Get a store:
store.get("test") // Output: { test: "test" }

// Remove a store:
store.remove("test") // Output: "ok"

// Remove all stores:
store.removeAll() // Output: "ok"

dpHelper vs Redux vs Zustand vs MobX

| Feature | dpHelper | Redux / RTK | Zustand | MobX | |---------|--------------|------------------|-------------|----------| | Type | Full suite (190+ utilities) + State Manager | Predictable state container | Minimal state manager | Reactive state manager | | Boilerplate | None (single import) | High (reduced with RTK) | Low | Low | | Global Access | Immediate global state (state.x) | No, requires provider | Yes, via store | Yes, via observable | | Reactivity | Built‑in observer | Only via bindings | Yes | Yes (highly reactive) | | DevTools | DevTools + Browser Extension | Redux DevTools | Yes | Yes | | Learning Curve | Very low | Medium/High | Low | Medium | | Action Handling | Simple actions + proxy | Actions + reducers | Setter functions | Decorators / actions | | Persistence | Built‑in (state/store/session) | Via middleware | Via middleware | Via plugins | | Ecosystem | 190+ built‑in utilities | Very large | Medium | Medium | | React Usage | state.x anywhere | Hooks + provider | Hooks | Decorators / hooks | | HTML/Vanilla Usage | Native (script tag) | No | No | No | | Philosophy | “Single source of truth” + full toolbox | Predictability & immutability | Simplicity | Automatic reactivity | | Best Use Cases | SaaS apps, dashboards, multi‑framework projects | Large enterprise apps | Lightweight React apps | Highly dynamic UIs |

Console (devtools)

Type dphelper in the devtool console of your browser to have a look at all available tools that you can use! You can call these from everywhere without import (just one time in the main/root page).

Browser Extension (Chrome/Edge) ♥️

browser extension

dphelper Banner

dphelper Banner

Chrome: Download from Google Web Store

Edge: Download from Microsoft Addons

PS: dpHelper is compatible with all Chromium-based browsers like Edge or Brave!

dpHelper Browser Extension

The dpHelper browser extension allows you to manage your application's dpHelper NPM. Key features include:

  1. Simplified API operations: Easily manage and manipulate data with dpHelper's collection of scripts.
  2. Real-time monitoring: Track memory usage and localStorage to optimize your application's performance.
  3. Stay up-to-date: Receive updates and tips to improve your daily workflow.
  4. Easy installation: Simply import 'dphelper' in your project index to get started.
  5. Global accessibility: All scripts are available globally and can be accessed from anywhere in your application.

Security

Socket.dev

Snyk.io


Dario Passariello - [email protected], All rights reserved - Copyright (c) 2019 - 2026