Skip to content

Utilities ​

Helpers that ship with APIful but need no client. The status constants fit server code in any framework, such as Hono, Elysia, or Nitro.

UtilityImport fromWhat it does
HTTP Status Codesapiful/http-status-codesExports a constant for each status code the IANA registry assigns, such as NOT_FOUND for 404.
HTTP Status Phrasesapiful/http-status-phrasesExports the reason phrase of each status code the IANA registry assigns, such as 'Not Found'.
JSON to Type Definitionapiful/utilsInfers a TypeScript type from a JSON value and returns its source.