Tested functions, copied into your project.
No package to install, no dependency tree. Every function ships as plain source with a frozen contract — its signature and behaviour never change.
- all · 6
- number · 2
- date · 1
- string · 2
- object · 1
All functions
- stable
- TS
type ParseNumber = (input: string) => number | null
Convert a string to a finite number, or null when the string is not a decimal number.
npx toopo add number/parse
- stable
- TS
type Round = (value: number, places: number) => number | null
Round a number to a fixed number of decimal places, or null when the call cannot be answered.
npx toopo add number/round
- stable
- TS
type AddToDate = (date: Date, duration: Duration) => Date | null
Add a duration to a Date and get a new Date back, in UTC, without mutating the input, or null when the call cannot be answered exactly - with a named reason available beside it for a caller who needs to know which refusal it was.
npx toopo add date/add
- stable
- TS
type Levenshtein = (a: string, b: string) => number
Count the single-character insertions, deletions and substitutions that turn one string into the other, counting in Unicode code points.
npx toopo add string/levenshtein
- stable
- TS
type Slugify = (text: string) => string
Turn text into a URL-safe identifier: one lower-case run of letters, marks and digits per word, joined by single hyphens. The output is Unicode, not ASCII.
npx toopo add string/slugify
- stable
- TS
type DeepEqual = (left: unknown, right: unknown) => boolean
Compare two values by the data they carry rather than by reference, walking into arrays, objects, Map, Set, typed arrays, Date, RegExp and Error, terminating on graphs that return to themselves, and never writing to either argument.
npx toopo add object/deep-equal
Recently added
object/deep-equal
type DeepEqual = (left: unknown, right: unknown) => boolean
Aug 24, 2026
number/round
type Round = (value: number, places: number) => number | null
Aug 20, 2026
number/parse
type ParseNumber = (input: string) => number | null
Aug 17, 2026
date/add
type AddToDate = (date: Date, duration: Duration) => Date | null
Aug 17, 2026
No dependencies
npx toopo add copies plain source into lib/toopo/. Nothing is added to your package.json, ever.
Frozen contracts
A function's signature and behaviour never change. Updates can fix internals — they can never break callers.
Tested continuously
Every function carries its own test suite, run on every commit against the frozen contract.