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

@lipemat/js-helpers

v1.3.0

Published

Framework-agnostic TypeScript helper utilities used across @lipemat projects

Downloads

382

Readme

JS Helpers

Framework-agnostic TypeScript helper utilities used across @lipemat projects.

Each helper is small, dependency-light, and tree-shakeable. The package ships compiled ESM (.js) plus type declarations (.d.ts).

Installation

yarn add @lipemat/js-helpers
# or
npm install @lipemat/js-helpers

Usage

Every framework-agnostic helper is importable from the package root:

import {debounce, hexToRGB, domReady} from '@lipemat/js-helpers';

React hooks live under a separate subpath so the package root never loads React:

import {useMobile, useAsync} from '@lipemat/js-helpers/react';

Helpers

| Helper | Description | Docs | |------------------------------------------------------------|-------------------------------------------------------|----------------------------------------------| | classNameAmend, sanitizeCssModuleClass | Manipulate CSS class name strings. | classes | | hexToRGB, RGBToHex, getLightness | Convert between hex/RGB colors and measure lightness. | colors | | csvExport | Generate a CSV file and trigger a browser download. | csvExport | | getFormattedDate | Format a Date using mm/dd/yyyy tokens. | date | | debounce | Lodash-free debounce with immediate and cancel. | debounce | | delay | Resolve a promise after a set amount of time. | delay | | isDesktop, isMobile, hasMobileUserAgent | Detect desktop vs mobile clients. | device | | domReady | Run a callback once the DOM is ready. | dom-ready | | ErrorWithFields | Error subclass carrying per-field messages. | error | | decodeEntities, stripTags | Decode HTML entities or strip HTML tags from a string. | escaping | | injectScript | Inject an external script into the DOM once. | injectScript | | memoize | Lodash-free memoization with an inspectable cache. | memoize | | noop | A no-operation function. | noop | | keysOf, entriesOf | Type-safe Object.keys/Object.entries. | objects | | once | Run a function a single time and cache the result. | once | | generateRandomKey, add/removeLeading/TrailingSlash | Random keys and slash management. | string | | throttle | Lodash-free throttle with immediate and cancel. | throttle | | getUrlParam, getQueryArg, getQueryArgs, getQueryString, addQueryArgs, getFragment, buildQueryString | Read and append URL query arguments. | url | | useAsync | Run an async function and track its loading state. | useAsync | | useDebounce | Debounce a value for use as an effect dependency. | useDebounce | | useDebouncedInput | Manage an input value alongside a debounced copy. | useDebouncedInput | | useEffectOnce | Run an effect a single time on mount. | useEffectOnce | | useEffectOnChange | Run an effect on dependency change, skipping mount. | useEffectOnChange | | useMobile | Track whether the client is a mobile device. | useMobile |

The use* helpers are React hooks imported from @lipemat/js-helpers/react and require React >=18 (declared as an optional peer dependency). All other helpers are framework-agnostic and importable from the package root.

Development

yarn install      # install dependencies
yarn build        # compile src -> dist via tsc
yarn watch        # compile in watch mode
yarn validate-ts  # type-check with no emit
yarn lint         # ESLint (@lipemat/eslint-config)
yarn test         # Jest (jsdom)

See AGENTS.md for conventions on adding and documenting helpers.

License

MIT © Mat Lipe