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

stralo

v1.0.0

Published

Next-generation, zero-dependency, tree-shakable TS/JS utility suite.

Readme

stralo

Next-generation, zero-dependency, ultra-lightweight utility suite built for modern JavaScript and TypeScript environments.

stralo is an alternative to legacy utility libraries like Lodash. Engineered from the ground up for V8 execution speed, zero-allocation hot paths, strict type safety, and zero-overhead tree-shaking across Node.js, Bun, Deno, and Edge runtimes.

Key Features

  • Zero Dependencies: Built entirely with native ES2022+ primitives and type-safe abstractions.
  • Subpath ESM/CJS Exports: Import only what you need (stralo/array, stralo/deep) for minimal bundle footprint.
  • First-Class TypeScript: Deep type inference including string-path autocomplete (Path<T>), variadic tuple preservation, and strict type guards.
  • Prototype Pollution Protected: Built-in protection against dynamic property overrides (__proto__, constructor, prototype) across all deep and object utilities.
  • V8 JIT Optimized: Tailored to avoid hidden class mutations, maintain monomorphic inline caching (IC), and reduce garbage collection churn.

Installation

Bash

# pnpm
pnpm add stralo

# npm
npm install stralo

# yarn
yarn add stralo

# bun
bun add stralo

Quickstart

1. Subpath Import (Recommended for Optimal Bundle Size)

TypeScript

import { chunk, groupBy } from 'stralo/array';
import { get, deepClone } from 'stralo/deep';
import { pipe } from 'stralo/fp';

// Deep property access with strict autocomplete
const user = { profile: { addresses: [{ city: 'Jakarta' }] } };
const city = get(user, 'profile.addresses[0].city'); // Typed as string

// Functional pipeline execution
const activeUsers = pipe(
  [
    { name: 'Alice', role: 'admin', active: true },
    { name: 'Bob', role: 'user', active: false },
  ],
  (list) => list.filter((u) => u.active),
  (list) => groupBy(list, (u) => u.role)
);

2. Root Barrel Import

Modern bundlers (Vite, Webpack 5, Rollup, esbuild) automatically tree-shake unused functions when imported from the root barrel.

TypeScript

import { deepClone, pipe, camelCase } from 'stralo';

const cloned = deepClone({ key: new Set([1, 2, 3]) });
const keyName = camelCase('user-first-name'); // 'userFirstName'

Module Map & API Overview

| Module | Core Exports | Subpath Export | | ---------------------- | ------------------------------------------------------------------------ | ---------------------------------------- | | stralo/array | chunk, difference, groupBy, partition, uniq, zip | import { ... } from 'stralo/array' | | stralo/object | pick, omit, mapKeys, mapValues, invert | import { ... } from 'stralo/object' | | stralo/string | camelCase, kebabCase, snakeCase, pascalCase, truncate, words | import { ... } from 'stralo/string' | | stralo/number | clamp, inRange, randomInt, round, sum, mean | import { ... } from 'stralo/number' | | stralo/date | addDays, diffInDays, endOf, format, isLeapYear, startOf | import { ... } from 'stralo/date' | | stralo/predicate | isEmpty, isEqual, isNil, isObject, isPromise | import { ... } from 'stralo/predicate' | | stralo/deep | deepClone, deepMerge, get, set | import { ... } from 'stralo/deep' | | stralo/fp | compose, curry, debounce, memoize, pipe | import { ... } from 'stralo/fp' |

TypeScript Capabilities

Autocompleted String Paths (get / set)

stralo/deep provides compile-time type validation for object paths up to 5 levels deep.

TypeScript

import { get, set } from 'stralo/deep';

interface Config {
  database: {
    connection: {
      host: string;
      port: number;
    };
  };
}

const config: Config = {
  database: { connection: { host: 'localhost', port: 5432 } },
};

// IDE Autocompletes: 'database' | 'database.connection' | 'database.connection.host' | ...
const host = get(config, 'database.connection.host'); // Inferenced return type: string

Performance Benchmark Metrics

stralo is continuously benchmarked using mitata against standard utilities on Node.js v20 (V8 v11.3).

| Benchmark Operation | stralo Performance | Lodash Performance | Improvement | | ----------------------------------------- | ---------------------- | ---------------------- | --------------- | | Array Chunking (10,000 items) | ~1.45 M ops/sec | ~420 K ops/sec | 3.4x faster | | Deep Object Cloning (Nested Map/Set) | ~1.12 M ops/sec | ~380 K ops/sec | 2.9x faster | | Array Difference (5,000 vs 2,500) | ~2.80 M ops/sec | ~1.10 M ops/sec | 2.5x faster | | Deep Path Retrieval (get) | ~18.5 M ops/sec | ~9.2 M ops/sec | 2.0x faster |

To run benchmarks locally:

Bash

pnpm bench

Security Protocol

All stralo object mutation and deep traversal utilities feature built-in runtime guards against Prototype Pollution. Attempting to pass objects containing malicious prototype keys (__proto__, constructor, prototype) will be safely ignored without throwing exceptions or corrupting global object prototypes.

TypeScript

import { deepMerge, set } from 'stralo/deep';

const maliciousPayload = JSON.parse('{"__proto__": {"admin": true}}');

// Safe merge: Prototype modification attempts are blocked
const cleanObject = deepMerge({}, maliciousPayload);

console.log(({} as any).admin); // undefined (safe)

Migration Quick Reference (from Lodash)

| Lodash | stralo Equivalent | Notes | | ------------------------------------------ | ----------------------------------------- | ------------------------------------------- | | import cloneDeep from 'lodash/cloneDeep' | import { deepClone } from 'stralo/deep' | Native circular structure & Set/Map support | | import get from 'lodash/get' | import { get } from 'stralo/deep' | Strongly typed string path autocomplete | | import merge from 'lodash/merge' | import { deepMerge } from 'stralo/deep' | Prototype pollution guarded by default | | import flow from 'lodash/flow' | import { pipe } from 'stralo/fp' | Variadic argument type preservation | | import debounce from 'lodash/debounce' | import { debounce } from 'stralo/fp' | Exposes .cancel() and .flush() |

Target Support Matrix

  • Runtimes: Node.js >= 18.0.0, Bun >= 1.0, Deno >= 1.30, Edge Workers (Cloudflare, Vercel Edge).
  • Browsers: ES2022+ targets (Chrome >= 104, Safari >= 15.4, Firefox >= 102).
  • Module Formats: Dual Dual ESM (.mjs) & CommonJS (.cjs) outputs with native type declarations (.d.ts).

License

MIT © stralo Authors