Releases: sindresorhus/is
Releases · sindresorhus/is
Release list
v8.1.0
v8.0.0
Breaking
- Require Node.js 22 faf7003
New
- Add
finiteNumberpredicate 63be5c0 - Add
nonNegativeNumberpredicate 63be5c0 - Add
positiveIntegerpredicate 63be5c0 - Add
negativeIntegerpredicate 54fc094 - Add
nonNegativeIntegerpredicate 54fc094 - Add
arrayOfpredicate factory 54fc094- Returns a type guard that checks if every item in an array matches the predicate. Useful for composing with other methods.
- Add
oneOfpredicate factory 54fc094- Returns a type guard that checks if a value is one of the given values. Best used with
as constfor precise type narrowing.
- Returns a type guard that checks if a value is one of the given values. Best used with
Fixes
- Fix
isEmptyObjectandisNonEmptyObjectincorrectly accepting functions and arrays 3b40955 - Fix
isNumericStringincorrectly accepting strings with surrounding whitespace 47415dc - Fix
isInRangesilently returningfalsewhen range containsNaN(now throws) ac46b54 - Fix
isEnumCaseincorrectly accepting numeric enum key names cb4ee0e - Fix numeric type guards (
isInteger,isEvenInteger,isOddInteger,isSafeInteger,isPositiveNumber,isNegativeNumber,isInfinite,isNan,isValidLength) narrowing the false branch tonever13febb6- These now use branded types so that
if (!is.integer(n)) { ... }keepsnasnumberinstead ofnever
- These now use branded types so that
v7.2.0
v7.1.1
v7.1.0
v7.0.2
v7.0.1
v7.0.0
v6.3.1
- Add missing type guard for
is.enumCase0df21e4