@sindresorhus/is is a TypeScript-based Node.js library for runtime type checking, it provides `is` methods that return booleans for whether a value matches a given type. It also includes `assert` helpers that perform the same checks but throw an error when the type does not match, useful for validating inputs and enabling better TypeScript type narrowing.
Project status
- Actively maintained: The repository shows recent activity, with the latest upstream push on 2026-05-11, and multiple versioned updates in 2026 (v8.0.0 on 2026-04-09, v8.1.0 on 2026-05-11).
- Update cadence: After v7.2.0 (2025-12-27), there was a gap of a few months until v8.0.0 (2026-04-09), then a shorter interval until v8.1.0 (2026-05-11), suggesting an ongoing, fairly steady development pace rather than maintenance mode.
AI summary generated
Recent updates
v8.1.0
v8.1.0 introduces type-safe negative assertions under the existing `assert` API, allowing runtime checks plus TypeScript narrowing for cases like `assert.not.undefined(value)`. The release notes only state a generic “negative assertion helper” addition, but the code adds a full public surface (new `assert.not` namespace and multiple named exports).
Featuresv8.0.0
v8.0.0 requires Node.js 22 and introduces several new type guard predicates (finiteNumber, nonNegativeNumber, positiveInteger, negativeInteger, nonNegativeInteger) plus two predicate factories (arrayOf, oneOf). It also improves TypeScript type guard narrowing for numeric predicates by using branded types so the false branch does not narrow to never, alongside several documented bug fixes.
BreakingFeaturesv7.2.0
v7.2.0 adds “predicate factory” mode for `is.any` and `is.all`, allowing calls like `is.any([is.string, is.number])` to return a reusable type-guard function. The implementation also introduces runtime validation for predicate arrays and changes how empty predicate arrays behave when values are provided.
BreakingFeaturesv7.1.1
v7.1.1 updates the `is.class` type guard to correctly recognize minified class expressions. The change adjusts the detection logic and adds a regression test for class expressions whose `Function#toString()` output omits the usual whitespace after `class`.
v7.1.0
v7.1.0 introduces new optional type-guard helpers, `is.optional` and `assert.optional`, for validating optional values. It also tightens TypeScript narrowing for `isUrlString` by introducing a branded `UrlString` type and updating related guard/assert signatures.
Featuresv7.0.2
v7.0.2 is a small patch release. The release notes say it fixes observable checking. The code change aligns with that, but the release notes do not mention a dependency version behavior change in package.json.
v7.0.1
Release v7.0.1 makes a targeted fix for `assertArray` so that the `message` passed to `assertArray` is forwarded into the per-element assertion callback. The change is small (few lines) but affects the TypeScript signature and how assertion callbacks are invoked.
v7.0.0
v7.0.0 raises the minimum supported Node.js version to 18 and removes deprecated API aliases related to value type checks. It also includes fixes to whitespace-related type guards and refines the exported type signatures, especially around `Class` and `isEmptyStringOrWhitespace`.
Breakingv6.3.1
v6.3.1 primarily improves TypeScript typing for the enum check helper by adding a proper type guard. The release notes mention the type-guard addition, and the code diff shows a corresponding exported function signature change with no runtime logic changes.
v6.3.0
v6.3.0 adds support for providing a custom error message to assertion functions, so failing assertions can throw TypeError with your specified message. The README and tests were updated accordingly.
Features