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

@sovereignbase/utils

v1.1.0

Published

Shared TypeScript utilities for removing repeated code across Sovereignbase codebases.

Readme

npm version CI codecov license

utils

Shared TypeScript utilities for removing repeated code across Sovereignbase codebases.

Compatibility

  • Runtimes: modern JavaScript runtimes; the repository includes runtime compatibility tests for Node, Bun, Deno, Cloudflare Workers, Edge Runtime, and browsers.
  • Module format: ESM and CommonJS.
  • Required globals / APIs: structuredClone is required for successful safeStructuredClone() results.
  • TypeScript: bundled types.

Goals

  • Remove repeated utility code from Sovereignbase repositories.
  • Keep shared helpers small, explicit, and side-effect free.
  • Validate behavior across the runtimes used in Sovereignbase projects.

Installation

npm install @sovereignbase/utils
# or
pnpm add @sovereignbase/utils
# or
yarn add @sovereignbase/utils
# or
bun add @sovereignbase/utils
# or
deno add jsr:@sovereignbase/utils
# or
vlt install jsr:@sovereignbase/utils

Usage

prototype()

import { prototype } from '@sovereignbase/utils'

prototype(null) // 'null'
prototype({ ok: true }) // 'record'
prototype(new URL('https://sovereignbase.dev')) // 'url'

Returns a normalized lowercase runtime tag for common primitives, serializable built-ins, and selected platform objects.

isUuidV7()

import { isUuidV7 } from '@sovereignbase/utils'

const value = '018f0d1e-6c82-7d4b-91c1-8a7b5e2f4a10'

if (isUuidV7(value)) {
  value // string, confirmed UUID v7
}

Checks that a value is a syntactically valid UUID version 7 string.

safeStructuredClone()

import { safeStructuredClone } from '@sovereignbase/utils'

const result = safeStructuredClone({ ok: true, nested: { count: 1 } })

if (result[0]) {
  const clone = result[1]
  clone // deep cloned value
}

Attempts a structured clone and returns a tuple instead of throwing on unsupported values.

Tests

  • Latest local npm run test run passed on Node v22.14.0.
  • Node unit suite: 5/5 passed.
  • Node integration suite: 2/2 passed.
  • Coverage: 100% statements, branches, functions, and lines.
  • Runtime E2E: Node ESM 9/9 passed.
  • Runtime E2E: Node CJS 9/9 passed.
  • Runtime E2E: Bun ESM 9/9 passed.
  • Runtime E2E: Bun CJS 9/9 passed.
  • Runtime E2E: Deno ESM 9/9 passed.
  • Runtime E2E: Cloudflare Workers ESM 9/9 passed.
  • Runtime E2E: Edge Runtime ESM 9/9 passed.
  • Browser E2E: 5/5 Playwright projects passed (chromium, firefox, webkit, mobile-chrome, mobile-safari).

Benchmarks

  • Latest local npm run bench run: Node v22.14.0 on win32 x64.
  • prototype(record): 8,060,210 ops/sec (248.1 ms).
  • prototype(url): 3,624,304 ops/sec (551.8 ms).
  • isUuidV7(valid): 3,575,658 ops/sec (279.7 ms).
  • isUuidV7(invalid): 4,184,715 ops/sec (239.0 ms).
  • safeStructuredClone(record): 110,503 ops/sec (2262.4 ms).
  • safeStructuredClone(function): 28,112 ops/sec (8893.1 ms).
  • Results vary by machine.

License

Apache-2.0