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

@maxxuxx/ts-utils

v0.8.0

Published

Shared TypeScript utilities

Readme

ts-utils

npm version

한국어

0.8 migration guide

Shared TypeScript utilities for projects that need small reusable runtime helpers

Install

npm install @maxxuxx/ts-utils

GitHub install is also supported

npm install github:maxxuxx/ts-utils

Import style

Use subpath imports instead of the package root. The package root is intentionally empty so applications can import only the runtime surface they need

import { parser } from "@maxxuxx/ts-utils/parser";
import { createApiFetcher } from "@maxxuxx/ts-utils/api-fetch";
import { createTokenSession } from "@maxxuxx/ts-utils/session";

Module map

| Entry point | Core role | Details | |---|---|---| | @maxxuxx/ts-utils/parser | Zod parser presets and wrappers for repeated runtime validation | parser | | @maxxuxx/ts-utils/is | Runtime type guards for primitives, objects, collections, and built-ins | is | | @maxxuxx/ts-utils/result | Discriminated success and failure values with mapping helpers | result | | @maxxuxx/ts-utils/try-catch | Result helpers for sync and async error boundaries | try-catch | | @maxxuxx/ts-utils/format | Formatting helpers for numbers, currency, dates, phone numbers, and units | format | | @maxxuxx/ts-utils/normalize | Small coercion helpers for stable number, text, date, and boolean values | normalize | | @maxxuxx/ts-utils/object | Plain object shaping helpers for request and response payloads | object | | @maxxuxx/ts-utils/url | Web path, API URL, and query string helpers | url | | @maxxuxx/ts-utils/promise | Timeout, retry, parallel, and settle helpers for promise tasks | promise | | @maxxuxx/ts-utils/json | JSON parse, stringify, fallback, safe result, and schema boundary helpers | json | | @maxxuxx/ts-utils/encoding | UTF-8, base64, hex, and byte conversion helpers | encoding | | @maxxuxx/ts-utils/encoding/base64url | Strict browser and Node base64url text and byte helpers | encoding/base64url | | @maxxuxx/ts-utils/jwt | JWT header and payload readers with expiration checks | jwt | | @maxxuxx/ts-utils/env | Runtime environment readers and Zod schema helpers | env | | @maxxuxx/ts-utils/time | Client/server timestamp helpers for estimating server time | time | | @maxxuxx/ts-utils/device | Runtime-selecting device UUID helper | device | | @maxxuxx/ts-utils/device/browser | Browser and renderer cookie-backed device UUID helpers | device/browser | | @maxxuxx/ts-utils/device/node | Node machine ID based device UUID helpers | device/node | | @maxxuxx/ts-utils/session | Framework-neutral token session controller | session | | @maxxuxx/ts-utils/session/sveltekit | SvelteKit cookie session factory | session/sveltekit | | @maxxuxx/ts-utils/session/react | React browser-storage token session helper | session/react | | @maxxuxx/ts-utils/api-fetch | Fetch API client with validation, refresh, retry, timeout, hooks, and endpoints | api-fetch | | @maxxuxx/ts-utils/api-fetch/sveltekit | SvelteKit adapter for api-fetch auth refresh | api-fetch/sveltekit | | @maxxuxx/ts-utils/http-response | Small Web Response helpers for route handlers | http-response |

Runtime notes

  • General utility modules are dependency-light and designed for browser and server code
  • Zod-backed modules re-export z from their own subpath when colocated schemas are useful
  • Device helpers are split into browser and Node subpaths; prefer the runtime-specific path when the target runtime is known

Development

npm run typecheck
npm test
npm run build