@sindresorhus/is
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -295,3 +295,3 @@ import type { ArrayLike, Class, Falsy, NodeStream, NonEmptyString, ObservableLike, Predicate, Primitive, TypedArray, WeakRef, Whitespace } from './types.js'; | ||
export declare function assertAny(predicate: Predicate | Predicate[], ...values: unknown[]): void | never; | ||
export declare function assertArray<T = unknown>(value: unknown, assertion?: (element: unknown) => asserts element is T, message?: string): asserts value is T[]; | ||
export declare function assertArray<T = unknown>(value: unknown, assertion?: (element: unknown, message?: string) => asserts element is T, message?: string): asserts value is T[]; | ||
export declare function assertArrayBuffer(value: unknown, message?: string): asserts value is ArrayBuffer; | ||
@@ -298,0 +298,0 @@ export declare function assertArrayLike<T = unknown>(value: unknown, message?: string): asserts value is ArrayLike<T>; |
@@ -846,4 +846,6 @@ const typedArrayTypeNames = [ | ||
if (assertion) { | ||
// eslint-disable-next-line unicorn/no-array-for-each, unicorn/no-array-callback-reference | ||
value.forEach(assertion); | ||
for (const element of value) { | ||
// @ts-expect-error: "Assertions require every name in the call target to be declared with an explicit type annotation." | ||
assertion(element, message); | ||
} | ||
} | ||
@@ -850,0 +852,0 @@ } |
{ | ||
"name": "@sindresorhus/is", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "Type check values", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
99427
1745
0