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

super-utils-plus

v1.0.2

Published

A superior alternative to Lodash with improved performance, TypeScript support, and developer experience

Readme

SuperUtilsPlus

A superior alternative to Lodash with improved performance, TypeScript support, and developer experience.

Features

  • Full TypeScript Support: Type definitions are first-class citizens
  • Modern JavaScript: Written for ES2020+ with full ESM and CommonJS support
  • Tree-Shakable: Only import what you need
  • Zero Dependencies: Lightweight and no bloat
  • Extensive Testing: High test coverage for reliable code
  • Extended Functionality: More utility functions than Lodash
  • Performance Focused: Optimized for speed and efficiency
  • Browser & Node.js: Works everywhere JavaScript runs

Installation

npm install super-utils-plus
# or
yarn add super-utils-plus
# or
pnpm add super-utils-plus

Usage Examples

Array Functions

import { chunk, compact, difference, flatten, flattenDeep, groupBy } from 'super-utils';

// Create chunks of arrays
chunk([1, 2, 3, 4, 5], 2);
// => [[1, 2], [3, 4], [5]]

// Remove falsy values from array
compact([0, 1, false, 2, '', 3, null, undefined, NaN]);
// => [1, 2, 3]

// Remove only null and undefined values
compactNil([0, 1, false, 2, '', 3, null, undefined, NaN]);
// => [0, 1, false, 2, '', 3, NaN]

// Find values not included in other arrays
difference([2, 1], [2, 3]);
// => [1]

// Find values not included using deep equality
differenceDeep([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }]);
// => [{ 'x': 2 }]

// Find values not included using a custom iteratee
differenceBy([2.1, 1.2], Math.floor, [2.3, 3.4]);
// => [1.2]

// Flatten an array one level
flatten([1, [2, [3, [4]], 5]]);
// => [1, 2, [3, [4]], 5]

// Recursively flatten an array
flattenDeep([1, [2, [3, [4]], 5]]);
// => [1, 2, 3, 4, 5]

// Group array elements by a key or function
groupBy([6.1, 4.2, 6.3], Math.floor);
// => { '4': [4.2], '6': [6.1, 6.3] }

groupBy(['one', 'two', 'three'], 'length');
// => { '3': ['one', 'two'], '5': ['three'] }

Object Functions

import { get, deepClone } from 'super-utils';

// Get a value from an object with a path
const object = { 'a': [{ 'b': { 'c': 3 } }] };

get(object, 'a[0].b.c');
// => 3

get(object, ['a', '0', 'b', 'c']);
// => 3

get(object, 'a.b.c', 'default');
// => 'default'

// Create a deep clone of an object
const original = { a: 1, b: { c: 2 } };
const clone = deepClone(original);

original.b.c = 99;
// clone.b.c is still 2

String Functions

import { camelCase } from 'super-utils';

// Convert a string to camel case
camelCase('Foo Bar');
// => 'fooBar'

camelCase('--foo-bar--');
// => 'fooBar'

camelCase('__FOO_BAR__');
// => 'fooBar'

Function Utilities

import { debounce } from 'super-utils';

// Create a debounced function
const debouncedSave = debounce(saveFunction, 300, { leading: true, trailing: true });

// Call it multiple times, but it will only execute once after 300ms of inactivity
debouncedSave();
debouncedSave();
debouncedSave();

// Cancel the debounced function
debouncedSave.cancel();

// Immediately invoke the debounced function
debouncedSave.flush();

Type Checking

import { 
  isNil, isUndefined, isNull, isNumber, isString, isBoolean,
  isFunction, isArray, isObject, isPlainObject, isEmpty, isEqual 
} from 'super-utils';

// Check types
isNumber(123);      // => true
isNumber('123');    // => false
isNumber(NaN);      // => false (more intuitive than Lodash)

isString('hello');  // => true
isObject({});       // => true
isObject([]);       // => false (unlike Lodash, arrays are not objects)
isArray([]);        // => true

// Check for null or undefined
isNil(null);        // => true
isNil(undefined);   // => true
isNil(0);           // => false

// Deep equality comparison
isEqual({ a: 1, b: 2 }, { a: 1, b: 2 });  // => true
isEqual([1, 2, 3], [1, 2, 3]);            // => true

Random Utilities

import { random, randomInt, randomString, randomUUID } from 'super-utils';

// Generate a random number between min and max
random(1, 10);  // => 4.237...

// Generate a random integer between min and max (inclusive)
randomInt(1, 10);  // => 7

// Generate a random string
randomString(10);  // => "a1b2c3d4e5"
randomString(5, 'ABC');  // => "BACAB"

// Generate a random UUID
randomUUID();  // => "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed"

Tree-Shaking with Module Imports

For optimal bundle size, import only what you need:

// Import only what you need from specific modules
import { chunk, difference } from 'super-utils/array';
import { get } from 'super-utils/object';
import { debounce } from 'super-utils/function';
import { isArray } from 'super-utils/utils';

TypeScript Support

SuperUtilsPlus is written in TypeScript and provides full type definitions:

import { get } from 'super-utils';

interface User {
  name: string;
  profile: {
    age: number;
    email: string;
  };
}

// Type-safe access with generics
const user = get<User>(data, 'users[0]');

License

MIT