{"library":"typed-assert","type":"library","category":null,"description":"typed-assert is a lightweight, zero-dependency assertion library designed specifically for TypeScript 3.7+ environments. It leverages TypeScript's assertion functions feature to perform runtime checks that simultaneously narrow types at compile-time, promoting the use of `unknown` for untrusted input instead of `any`. The library provides a suite of common assertion functions (`isString`, `isNumber`, `isRecord`, etc.) and combinators (`isArrayOf`, `isOneOf`, `isOption`), allowing developers to build robust type guards and custom composite assertions. As of version 1.0.9, it's a stable release with no explicit major release cadence, but it's actively maintained. A key differentiator is its compile-time type narrowing alongside runtime validation, contrasting with traditional assertion libraries like Chai or Jest's `expect` which primarily offer runtime validation without type inference benefits. For more complex schema validation needs, the documentation explicitly recommends considering `zod` as an alternative due to `typed-assert`'s simpler scope.","language":"javascript","status":"active","version":"1.0.9","tags":["javascript","assert","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install typed-assert","imports":["import * as t from 'typed-assert';","import { isString } from 'typed-assert';","import { safeJsonParse } from 'typed-assert';"]},{"cmd":"yarn add typed-assert","imports":[]},{"cmd":"pnpm add typed-assert","imports":[]}],"homepage":null,"github":"https://github.com/elierotenberg/typed-assert","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/typed-assert","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/typed-assert/compatibility"}}