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 🙏

© 2025 – Pkg Stats / Ryan Hefner

js-utils-kit

v0.5.5

Published

Essential JavaScript helpers

Downloads

44

Readme

Js Utils Kit

Modular JavaScript utilities with type support for strings, objects, arrays and more

Build Test codecov npm version JSR JSR Score License GitHub stars Issues PRs Last Commit Downloads Type Support Sponsor Follow @teneplays on X

Overview

JS Utils Kit is a compact and reliable library of essential JavaScript utility functions. It includes helpers for arrays, objects, numbers, promises, type checking, and more. Designed for performance and modularity, it integrates easily into JavaScript and TypeScript projects with minimal impact on bundle size.

Streamline your code with battle-tested, tree-shakable utilities.

This package includes utilities designed for both browser and Node.js environments, clearly organized and optimized for cross-platform compatibility.

Features

  • Organized by category (e.g., number, string, file, etc.)
  • Fully typed in TypeScript
  • Thoroughly tested with Jest
  • Tree‑shakeable and supports both ESM and CJS
  • CLI-ready tools for file and system operations

Installation

# via npm
npm install js-utils-kit

# via yarn
yarn add js-utils-kit

# via pnpm
pnpm add js-utils-kit

# via bun
bun add js-utils-kit

# via Deno (using npm)
deno add npm:js-utils-kit

# via Deno (using JSR)
deno add jsr:@tene/js-utils-kit

# via JSR
npx jsr add @tene/js-utils-kit

Usage

js-utils-kit offers a modular structure for utilities across different categories like number, string, array, object, env, and more. You can use full or scoped imports depending on your preference and project setup.

Recommended Import

Import only what you need by utility category:

import number from 'js-utils-kit/number';
import string from 'js-utils-kit/string';
import array from 'js-utils-kit/array';
import object from 'js-utils-kit/object';
import env from 'js-utils-kit/env';

console.log(number.clamp(150, 0, 100)); // 100
console.log(string.capitalize('hello world')); // 'Hello World'
console.log(array.unique([1, 2, 2, 3])); // [1, 2, 3]
console.log(object.isEmpty({})); // true
console.log(env.isBrowser()); // true/false

Full Import (All utils in one namespace)

import * as kit from 'js-utils-kit';

console.log(kit.number.clamp(150, 0, 100)); // 100
console.log(kit.string.capitalize('hello')); // 'Hello'
console.log(kit.array.unique([1, 1, 2])); // [1, 2]
console.log(kit.object.isEmpty({})); // true
console.log(kit.env.isNode()); // true/false

Named Imports

import { number, string, env } from 'js-utils-kit';

console.log(number.clamp(42, 0, 100)); // 42
console.log(string.capitalize('js-utils-kit')); // 'Js-utils-kit'
console.log(env.isDev()); // true/false

Using JSR or Deno

import { number, string, env } from '@tene/js-utils-kit';
// or
import { number, string, env } from 'jsr:@tene/js-utils-kit';
// or
import number from '@tene/js-utils-kit/number';
import string from '@tene/js-utils-kit/string';
import array from '@tene/js-utils-kit/array';
import object from '@tene/js-utils-kit/object';
import env from '@tene/js-utils-kit/env';

CommonJS Usage

const { number, string, array, object, env } = require('js-utils-kit');

console.log(number.clamp(150, 0, 100)); // 100
console.log(string.capitalize('hello world')); // 'Hello World'
console.log(array.unique([1, 2, 2, 3])); // [1, 2, 3]
console.log(object.isEmpty({})); // true
console.log(env.isBrowser()); // true/false

Documentation

Full documentation available at GitHub Pages

Requirements

  • Node.js: Version 18.0.0 or higher
  • Yarn (or npm as an alternative)
  • TypeScript (optional, for TypeScript projects or development)
  • Browsers: Modern browsers for browser-based usage

Contributing

We welcome contributions whether it's fixing bugs, adding utilities, improving docs, or writing tests. See CONTRIBUTING.md for guidelines and join our GitHub Discussions to share ideas or propose features.

FAQ

Yes, JS Utils Kit is compatible with modern browsers and Node.js.

No, the library works in plain JavaScript, but TypeScript users benefit from full type definitions and editor support.

Open an issue on GitHub or join the Discussions to ask questions or share feedback.

Import only what you need:

import { clamp } from 'js-utils-kit/number';

This enables tree-shaking for smaller, optimized bundles.

License

Released under the MIT License