{"library":"typescript-nullable","type":"library","category":null,"description":"typescript-nullable is a utility library for TypeScript that formalizes the concept of possibly absent values, providing a type-safe and functional approach to handling `null` and `undefined`. It defines a `Nullable<T>` type, which is explicitly `T | null | undefined`, mirroring the `Maybe` type found in functional languages like Haskell or Elm. Beyond the type definition, the library exports a `Nullable` object containing a suite of utility functions designed to interact safely with these potentially absent values. These functions, such as `map`, `withDefault`, `isNone`, and `isSome`, are curried and pure, promoting a functional programming style and enhancing type safety by leveraging TypeScript's type guards. As of version 0.6.0, the library is actively maintained, with incremental updates focusing on API refinements and feature additions, though a specific release cadence is not formally published. Its core value proposition lies in enabling developers to write more resilient code by explicitly managing the presence or absence of values, thereby reducing runtime errors associated with unexpected `null` or `undefined` references and offering a robust alternative to imperative null checks.","language":"javascript","status":"active","version":"0.6.0","tags":["javascript","TypeScript","Nullable","Maybe","Monad","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install typescript-nullable","imports":["import { Nullable } from 'typescript-nullable';","import { Nullable } from 'typescript-nullable';\nNullable.isSome(value);","type None = null | undefined;"]},{"cmd":"yarn add typescript-nullable","imports":[]},{"cmd":"pnpm add typescript-nullable","imports":[]}],"homepage":null,"github":"https://github.com/kylecorbelli/typescript-nullable","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/typescript-nullable","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/typescript-nullable/compatibility"}}