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

utiliverse

v0.0.3

Published

A Universe of TypeScript Utilities

Downloads

20

Readme

Utiliverse 🌌

npm version npm downloads MIT License TypeScript

A Universe of TypeScript Utilities

"Simplify Your Code, Expand Your Possibilities" 🚀


🌟 Features

  • 50+ Utility Functions - A comprehensive collection of TypeScript utilities
  • Zero Dependencies - Lightweight and pure TypeScript
  • Universal Compatibility - Works in Node.js, Deno, and modern browsers
  • TypeScript First - Full type inference and generics support
  • Modular Design - Import only what you need

📦 Installation

npm install utiliverse
# or
yarn add utiliverse
# or
bun add utiliverse

🚀 Quick Start

import { capitalize, debounce, deepClone, generateUUID } from 'utiliverse';

// Capitalize a string
console.log(capitalize('hello world')); // "Hello world"

// Debounce a function
const debouncedLog = debounce(console.log, 300);
debouncedLog('This will log after 300ms of inactivity');

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

// Generate a UUID
console.log(generateUUID()); // "f47ac10b-58cc-4372-a567-0e02b2c3d479"

📚 Core Utilities

🛠️ General Utilities

import { capitalize, debounce, deepClone, memoize, throttle } from 'utiliverse';

capitalize('hello world'); // "Hello world"
debounce(() => console.log('Debounced!'), 300);
deepClone({ a: 1, b: { c: 2 } });
memoize((a: number, b: number) => a + b);
throttle(() => console.log('Throttled!'), 300);

🔢 Math Utilities

import { clamp, factorial, fibonacci, gcd, lcm, roundToDecimal } from 'utiliverse';

clamp(10, 0, 5); // 5
factorial(5); // 120
fibonacci(10); // 55
gcd(14, 21); // 7
lcm(4, 6); // 12
roundToDecimal(3.14159, 2); // 3.14

📜 String Utilities

import { reverseString, truncateString, toCamelCase, toKebabCase, toSnakeCase, encryptString, decryptString } from 'utiliverse';

reverseString('hello'); // "olleh"
truncateString('This is a long string', 10); // "This is a..."
toCamelCase('hello-world'); // "helloWorld"
toKebabCase('helloWorld'); // "hello-world"
toSnakeCase('helloWorld'); // "hello_world"

const plainText = "Hello World!";
const key = "YOUR_SECRET_KEY";

(async () => {
  try {
    const encrypted = await encryptString(plainText, key);
    console.log("Encrypted value:", encrypted);
    // Encrypted value: ddf6d2af194f6afc075a06ebfbce1e75:9b2d2517c3ef4d91408003b22ae8ca6f

    const decrypted = await decryptString(encrypted, key);
    console.log("Decrypted value:", decrypted);
    // Decrypted value: Hello World!
  } catch (error: unknown) {
    if (error instanceof Error) {
      console.error(error.message);
    }
  }
})();

🧩 Array Utilities

import { chunkArray, flattenArray, shuffleArray, uniqueArray } from 'utiliverse';

chunkArray([1, 2, 3, 4, 5], 2); // [[1, 2], [3, 4], [5]]
flattenArray([1, [2, [3, 4]]]); // [1, 2, 3, 4]
shuffleArray([1, 2, 3, 4, 5]); // [3, 1, 5, 2, 4] (randomized)
uniqueArray([1, 2, 2, 3, 4, 4]); // [1, 2, 3, 4]

🧠 Advanced Utilities

import { compose, pipe, retry, sleep, timeout, toMorseCode } from 'utiliverse';

// Text to Morse Code
toMorseCode("kiron"); // -.- .. .-. --- -.

// Compose functions
const addThenMultiply = compose((x: number) => x * 2, (x: number) => x + 1);
addThenMultiply(5); // 12

// Pipe functions
const multiplyThenAdd = pipe((x: number) => x * 2, (x: number) => x + 1);
multiplyThenAdd(5); // 11

// Retry a function
retry(() => fetch('https://api.example.com'), { retries: 3 });

// Sleep for 1 second
await sleep(1000);

// Timeout a function
timeout(() => longRunningTask(), 5000);

💡 Why Utiliverse?

  • Comprehensive: Over 100 utilities for all your development needs
  • TypeScript Optimized: Full type inference and generics support
  • Lightweight: Zero dependencies, minimal footprint
  • Modular: Import only what you need, tree-shakeable
  • Universal: Works in Node.js, Deno, and modern browsers

🛠️ Contributing

# Clone repo
git clone https://github.com/kiron0/utiliverse.git

# Install dependencies
bun install

# Build project
bun run build

📜 License

MIT © Toufiq Hasan Kiron

"Simplify the complex, and the universe is yours." - Utiliverse Proverb 🌌