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

@empyria/classification

v0.1.4

Published

Low-level utility functions for higher-level libraries in the Empyria nanoservice framework

Readme

@empyria/classification

Low-level utility functions for higher-level libraries in Empyria, a nanoservice framework built primarily on Bun.

This package has no framework-specific logic of its own — it's the shared foundation (date/time, array, object, string, and chunking helpers) that other Empyria libraries build on.

Requirements

  • Bun >=1.4.0 or Node.js >=26
  • Plain ESM, no build step, no TypeScript

Both requirements come from using the native Temporal global (no luxon, no polyfill) for all date/time handling.

Install

bun add @empyria/classification

Usage

import { startOfDay, capitalise, groupBy, chunkDocument } from '@empyria/classification'

Everything is re-exported from the package root via ArClass.js. Individual modules under lib/ can also be imported directly if you only need one:

import { formatRetention } from '@empyria/classification/lib/Date.js'

Modules

| Module | Purpose | | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ArClass.js | Package entry point; re-exports every module below plus a handful of day-boundary helpers (isToday, startOfDay, endOfDay, day) and generic status constants (OK, NA, ANY, ALL). | | lib/Date.js | Date/time arithmetic, formatting, and retention/expiry helpers, built on Temporal. | | lib/ArrayServices.js | Array helpers: async map/filter/find, grouping, random selection, permutations, combinations. | | lib/Helpers.js | Object helpers (defined-value copying, path get/set, cloning), templating, retry/polling utilities. | | lib/Math.js | Small random-number helpers (rand, chances, randEquidistant). | | lib/Name.js | String helpers: transliteration, capitalisation, truncation. | | lib/Chunker.js | Splits document text into overlapping, sentence-aware chunks for embedding/RAG retrieval. |

Every exported function is documented with JSDoc directly in its source file — hovering a function in VSCode or Zed shows its parameters and return type without any extra tooling, since both editors read JSDoc from plain .js files automatically.

Tests live under test/, one file per module, separate from the lib/ sources.

Scripts

bun run format       # check formatting (oxfmt)
bun run format:fix   # apply formatting
bun run lint         # lint (oxlint)
bun run lint:fix     # lint and fix
bun run test         # run tests with coverage

License

MIT © Imre Fazekas