Toopo — utility functions with a public, executable contract

6 utility functions with a published contract: a signature, property-based invariants, and every edge case named and settled. The source is copied into your project.

toopo

- [](https://github.com/toopohq/toopo)

# 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

- [number/parse](typescript/number/parse@1/)

  - 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
  ```
- [number/round](typescript/number/round@1/)

  - 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
  ```
- [date/add](typescript/date/add@1/)

  - 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
  ```
- [string/levenshtein](typescript/string/levenshtein@1/)

  - 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
  ```
- [string/slugify](typescript/string/slugify@1/)

  - 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
  ```
- [object/deep-equal](typescript/object/deep-equal@1/)

  - 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

  ](typescript/object/deep-equal@1/)
- [number/round

  type Round = (value: number, places: number) => number | null

  Aug 20, 2026

  ](typescript/number/round@1/)
- [number/parse

  type ParseNumber = (input: string) => number | null

  Aug 17, 2026

  ](typescript/number/parse@1/)
- [date/add

  type AddToDate = (date: Date, duration: Duration) => Date | null

  Aug 17, 2026

  ](typescript/date/add@1/)

### 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.

[toopo]()

Open source · MIT licence · No account required

- [GitHub ↗](https://github.com/toopohq/toopo)
