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

@d3oxy/utils

v0.2.0

Published

A personal utility toolkit - reusable TypeScript functions, helpers, and patterns

Readme

@d3oxy/utils

A personal utility toolkit — a growing collection of reusable TypeScript functions, helpers, and patterns that simplify development across multiple projects.

Philosophy

  • Write once, reuse everywhere — consistent logic across projects
  • Clean, typed, and minimal — no bloated dependencies
  • Composable — each utility can be used independently

Installation

npm install @d3oxy/utils
# or
pnpm add @d3oxy/utils
# or
yarn add @d3oxy/utils

Import Structure

Each utility is imported directly from its file path:

import { generateUniqueSlug } from "@d3oxy/utils/slug/generate-unique-slug";
import { asyncMap } from "@d3oxy/utils/array/async-map";
import { pick } from "@d3oxy/utils/object/pick";

Adding new utilities: Simply create a new .ts file in src/ and it will automatically be available as an import path. For example:

  • src/date/format-date.ts@d3oxy/utils/date/format-date
  • src/validation/is-email.ts@d3oxy/utils/validation/is-email

No configuration needed! The package exports are set up to automatically expose all files.

Utilities

Array Utilities

Utilities for working with arrays and iterables.

  • asyncMap — Apply async functions over iterables (including promises)
  • pruneNull — Filter out null elements from arrays

Assertion Utilities

Utilities for runtime assertions and type guards.

  • assert — Validate truthiness at runtime with type guards
  • nullThrows — Throw if value is null, with type refinement

Object Utilities

Utilities for manipulating and transforming objects.

  • pick — Select specific keys from objects
  • omit — Exclude keys from objects

Slug Utilities

Utilities for generating URL-safe slugs.

Type Utilities

TypeScript type helpers and utilities for advanced type manipulation.

  • BetterOmit — Enhanced Omit type that preserves index signatures
  • Expand — Simplify TypeScript's object type rendering
  • Equals — Test if two types are exactly the same
  • EmptyObject — Empty object type definition
  • ErrorMessage — Type-level error message utility

Development

# Install dependencies
pnpm install

# Build the library
pnpm build

# Run tests
pnpm test

# Run tests in watch mode
pnpm test --watch

# Type check
pnpm typecheck

# Lint code
pnpm lint

# Format code
pnpm format

# Run all checks (lint + format)
pnpm check

Project Structure

@d3oxy/utils/
├── src/
│   ├── array/
│   │   ├── async-map.ts
│   │   └── prune-null.ts
│   ├── assert/
│   │   ├── assert.ts
│   │   └── null-throws.ts
│   ├── object/
│   │   ├── omit.ts
│   │   └── pick.ts
│   ├── slug/
│   │   └── generate-unique-slug.ts
│   └── type/
│       ├── better-omit.ts
│       ├── empty-object.ts
│       ├── equals.ts
│       ├── error-message.ts
│       └── expand.ts
├── docs/
│   ├── array.md
│   ├── assert.md
│   ├── object.md
│   ├── slug.md
│   └── type.md
├── tests/
│   └── slug/
│       └── generate-unique-slug.test.ts
├── dist/                     # Built output (gitignored)
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── biome.json

Credits & Thanks

This utility library includes code and inspiration from various open-source projects and communities:

  • Convex — Several utilities (asyncMap, pruneNull, pick, omit, nullThrows, BetterOmit, Expand, EmptyObject, ErrorMessage) were adapted from Convex's internal utilities. Thank you to the Convex team for their excellent work and for making these patterns available.

  • TypeScript Community — The Equals type utility is based on a solution from the TypeScript GitHub issue tracker (#27024) by the TypeScript community.

  • Open Source Community — Thanks to all the developers who share their knowledge and code, making projects like this possible.

All utilities have been adapted, refactored, and documented to fit this library's conventions and to remove framework-specific dependencies.

Upcoming Utilities

The following categories are planned for future releases:

  • Dates & Time – formatters, relative-time helpers
  • Validation & Guards – type-safe and reusable logic
  • API Helpers – error wrappers, pagination, retry logic
  • Misc Utils – random generators, async helpers

Contributing

This is a personal utility library, but suggestions and improvements are welcome!

License

MIT © d3oxy