A small, strict, modern TypeScript utility suite — the everyday helpers you end up rewriting in every project, packaged the right way.
Status: published on npm — the packaging, CI, docs, and release pipeline are in place; the utility surface is still small and growing. As much a showcase of npm packaging best practices as a utility library.
# the whole suite
pnpm add @goodnight-dev/utils
# or just the area you need (independently versioned)
pnpm add @goodnight-dev/string
// 1. Granular package — smallest dependency surface, versioned on its own.
import { capitalize } from '@goodnight-dev/string';
// 2. Umbrella subpath — one dependency, organized by area.
import { capitalize } from '@goodnight-dev/utils/string';
// 3. Whole suite — everything from one entry point.
import { capitalize } from '@goodnight-dev/utils';
All three are fully typed, ESM-only, and tree-shakable.
| Package | Description |
|---|---|
@goodnight-dev/utils |
Umbrella package |
@goodnight-dev/predicate |
Type and value predicates (is*) |
@goodnight-dev/string |
String utilities |
strictTypeChecked + Prettier)This repo is opinionated about how the code is written. See CONTRIBUTING.md for the full rationale; in short:
node_modules but our own code.*.md (repo-only,
academic) explaining alternative implementations and why we chose ours — e.g.
capitalize.md.This is a pnpm workspace. Requires Node >=22.
pnpm install # install + link workspace packages
pnpm build # build every package (tsdown)
pnpm test # run the test suite (vitest)
pnpm typecheck # tsc --noEmit across packages
pnpm lint # eslint
pnpm format # prettier --check
pnpm check # everything: format, lint, build, typecheck, test, exports
pnpm docs:build # generate the API docs site (TypeDoc)
docs/ — recipes (adding a function, adding a package, cutting
a release) and architecture decision records.MIT © Ian Goodnight