Add is.fortyTwo

This commit is contained in:
Sindre Sorhus 2022-01-28 01:21:07 +07:00
parent c3d12667fd
commit 99153d79db
3 changed files with 11 additions and 0 deletions

View file

@ -368,6 +368,8 @@ is.formData = (value: unknown): value is FormData => isObjectOfType<FormData>('F
is.urlSearchParams = (value: unknown): value is URLSearchParams => isObjectOfType<URLSearchParams>('URLSearchParams')(value);
is.fortyTwo = (value: unknown): value is 42 => value === 42;
export type Predicate = (value: unknown) => boolean;
type ArrayMethod = (fn: (value: unknown, index: number, array: unknown[]) => boolean, thisArg?: unknown) => boolean;