New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tool-belt/type-predicates

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tool-belt/type-predicates - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

dist/assertions/assertIsAnyArrayBuffer.d.ts

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsAnyArrayBuffer: import("../types").TypeAssertion<ArrayBuffer | SharedArrayBuffer, undefined>;
export declare const assertIsAnyArrayBuffer: import("../types").TypeAssertion<ArrayBuffer | SharedArrayBuffer, import("../types").ErrorMessage>;

@@ -1,2 +0,2 @@

import { ValueValidator } from '../types';
import { ErrorMessage, ValueValidator } from '../types';
/**

@@ -20,2 +20,4 @@ * @category Type Assertion

export declare function assertIsArray(input: unknown): asserts input is any[];
export declare function assertIsArray(input: unknown, options?: ErrorMessage): asserts input is any[];
export declare function assertIsArray<T>(input: unknown, options: ValueValidator): asserts input is T[];
export declare function assertIsArray<T>(input: unknown, options: ValueValidator & ErrorMessage): asserts input is T[];

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsArrayBuffer: import("../types").TypeAssertion<ArrayBuffer, undefined>;
export declare const assertIsArrayBuffer: import("../types").TypeAssertion<ArrayBuffer, import("../types").ErrorMessage>;
import { AsyncFunction } from '../guards/isAsyncFunction';
import { ErrorMessage } from '../types';
/**

@@ -8,2 +9,2 @@ * @remarks

*/
export declare function assertIsAsyncFunction<T = unknown>(input: unknown): asserts input is AsyncFunction<T>;
export declare function assertIsAsyncFunction<T = unknown>(input: unknown, options?: ErrorMessage): asserts input is AsyncFunction<T>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -7,2 +8,2 @@ * @remarks

*/
export declare function assertIsAsyncGenerator<Y = unknown, R = unknown, N = unknown>(input: unknown): asserts input is AsyncGenerator<Y, R, N>;
export declare function assertIsAsyncGenerator<Y = unknown, R = unknown, N = unknown>(input: unknown, options?: ErrorMessage): asserts input is AsyncGenerator<Y, R, N>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
import { TypedAsyncGeneratorFunction } from '../guards/isAsyncGeneratorFunction';

@@ -6,2 +7,2 @@ /**

*/
export declare function assertIsAsyncGeneratorFunction<Y = unknown, R = unknown, N = unknown>(input: unknown): asserts input is TypedAsyncGeneratorFunction<Y, R, N>;
export declare function assertIsAsyncGeneratorFunction<Y = unknown, R = unknown, N = unknown>(input: unknown, options?: ErrorMessage): asserts input is TypedAsyncGeneratorFunction<Y, R, N>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -8,2 +9,2 @@ * @remarks

*/
export declare function assertIsAsyncIterable<T = unknown>(input: unknown): asserts input is AsyncIterable<T>;
export declare function assertIsAsyncIterable<T = unknown>(input: unknown, options?: ErrorMessage): asserts input is AsyncIterable<T>;

@@ -15,2 +15,2 @@ /**

*/
export declare const assertIsBigInt: import("../types").TypeAssertion<bigint, undefined>;
export declare const assertIsBigInt: import("../types").TypeAssertion<bigint, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsBoolean: import("../types").TypeAssertion<boolean, undefined>;
export declare const assertIsBoolean: import("../types").TypeAssertion<boolean, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsBooleanObject: import("../types").TypeAssertion<Boolean, undefined>;
export declare const assertIsBooleanObject: import("../types").TypeAssertion<Boolean, import("../types").ErrorMessage>;

@@ -6,2 +6,2 @@ /// <reference types="node" />

*/
export declare const assertIsBuffer: import("../types").TypeAssertion<Buffer, undefined>;
export declare const assertIsBuffer: import("../types").TypeAssertion<Buffer, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsDataView: import("../types").TypeAssertion<DataView, undefined>;
export declare const assertIsDataView: import("../types").TypeAssertion<DataView, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsDate: import("../types").TypeAssertion<Date, undefined>;
export declare const assertIsDate: import("../types").TypeAssertion<Date, import("../types").ErrorMessage>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -8,2 +9,2 @@ * @remarks

*/
export declare function assertIsDefined<T>(input: T | undefined): asserts input is T;
export declare function assertIsDefined<T>(input: T | undefined, options?: ErrorMessage): asserts input is T;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -21,2 +22,2 @@ * @category Type Assertion

*/
export declare function assertIsError<T extends Error = Error>(input: unknown): asserts input is T;
export declare function assertIsError<T extends Error = Error>(input: unknown, options?: ErrorMessage): asserts input is T;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -29,2 +30,2 @@ * @remarks

*/
export declare function assertIsFunction<T extends Function = Function>(input: unknown): asserts input is T;
export declare function assertIsFunction<T extends Function = Function>(input: unknown, options?: ErrorMessage): asserts input is T;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -7,2 +8,2 @@ * @remarks

*/
export declare function assertIsGenerator<Y = unknown, R = unknown, N = unknown>(input: unknown): asserts input is Generator<Y, R, N>;
export declare function assertIsGenerator<Y = unknown, R = unknown, N = unknown>(input: unknown, options?: ErrorMessage): asserts input is Generator<Y, R, N>;

@@ -1,2 +0,2 @@

import { TypedGeneratorFunction } from '../types';
import { ErrorMessage, TypedGeneratorFunction } from '../types';
/**

@@ -8,2 +8,2 @@ * @remarks

*/
export declare function assertIsGeneratorFunction<Y = unknown, R = unknown, N = unknown>(input: unknown): asserts input is TypedGeneratorFunction<Y, R, N>;
export declare function assertIsGeneratorFunction<Y = unknown, R = unknown, N = unknown>(input: unknown, options?: ErrorMessage): asserts input is TypedGeneratorFunction<Y, R, N>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -9,2 +10,2 @@ * @remarks

*/
export declare function assertIsIterable<T = unknown>(input: unknown): asserts input is Iterable<T>;
export declare function assertIsIterable<T = unknown>(input: unknown, options?: ErrorMessage): asserts input is Iterable<T>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -7,2 +8,2 @@ * @remarks

*/
export declare function assertIsIterator<Y = unknown, R = unknown, N = unknown>(input: unknown): asserts input is Iterator<Y, R, N>;
export declare function assertIsIterator<Y = unknown, R = unknown, N = unknown>(input: unknown, options?: ErrorMessage): asserts input is Iterator<Y, R, N>;

@@ -1,2 +0,2 @@

import { KeyValidator, ValueValidator } from '../types';
import { ErrorMessage, KeyValidator, ValueValidator } from '../types';
/**

@@ -26,4 +26,8 @@ * @category Type Assertion

export declare function assertIsMap(input: unknown): asserts input is Map<unknown, unknown>;
export declare function assertIsMap(input: unknown, options?: ErrorMessage): asserts input is Map<unknown, unknown>;
export declare function assertIsMap<K>(input: unknown, options: KeyValidator): asserts input is Map<K, unknown>;
export declare function assertIsMap<K>(input: unknown, options: KeyValidator & ErrorMessage): asserts input is Map<K, unknown>;
export declare function assertIsMap<V>(input: unknown, options: ValueValidator): asserts input is Map<string, V>;
export declare function assertIsMap<V>(input: unknown, options: ValueValidator & ErrorMessage): asserts input is Map<string, V>;
export declare function assertIsMap<K, V>(input: unknown, options: ValueValidator & KeyValidator): asserts input is Map<K, V>;
export declare function assertIsMap<K, V>(input: unknown, options: ValueValidator & KeyValidator & ErrorMessage): asserts input is Map<K, V>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -8,2 +9,2 @@ * @remarks

*/
export declare function assertIsNotNull<T>(input: T | null): asserts input is T;
export declare function assertIsNotNull<T>(input: T | null, options?: ErrorMessage): asserts input is T;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -7,2 +8,2 @@ * @remarks

*/
export declare function assertIsNotNullish<T>(input: T | undefined | null): asserts input is T;
export declare function assertIsNotNullish<T>(input: T | undefined | null, options?: ErrorMessage): asserts input is T;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsNull: import("../types").TypeAssertion<null, undefined>;
export declare const assertIsNull: import("../types").TypeAssertion<null, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsNullish: import("../types").TypeAssertion<null | undefined, undefined>;
export declare const assertIsNullish: import("../types").TypeAssertion<null | undefined, import("../types").ErrorMessage>;

@@ -15,2 +15,2 @@ /**

*/
export declare const assertIsNumber: import("../types").TypeAssertion<number, undefined>;
export declare const assertIsNumber: import("../types").TypeAssertion<number, import("../types").ErrorMessage>;

@@ -15,2 +15,2 @@ /**

*/
export declare const assertIsNumberObject: import("../types").TypeAssertion<Number, undefined>;
export declare const assertIsNumberObject: import("../types").TypeAssertion<Number, import("../types").ErrorMessage>;

@@ -20,2 +20,2 @@ /**

*/
export declare const assertIsObject: import("../types").TypeAssertion<object, undefined>;
export declare const assertIsObject: import("../types").TypeAssertion<object, import("../types").ErrorMessage>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -7,2 +8,2 @@ * @remarks

*/
export declare function assertIsPromise<T = unknown>(input: unknown): asserts input is Promise<T>;
export declare function assertIsPromise<T = unknown>(input: unknown, options?: ErrorMessage): asserts input is Promise<T>;

@@ -1,2 +0,2 @@

import { KeyValidator, ValueValidator } from '../types';
import { ErrorMessage, KeyValidator, ValueValidator } from '../types';
/**

@@ -23,4 +23,8 @@ * @category Type Assertion

export declare function assertIsRecord(input: unknown): asserts input is Record<string | symbol, unknown>;
export declare function assertIsRecord(input: unknown, options?: ErrorMessage): asserts input is Record<string | symbol, unknown>;
export declare function assertIsRecord<K extends string | symbol>(input: unknown, options: KeyValidator): asserts input is Record<K, unknown>;
export declare function assertIsRecord<K extends string | symbol>(input: unknown, options: KeyValidator & ErrorMessage): asserts input is Record<K, unknown>;
export declare function assertIsRecord<V>(input: unknown, options: ValueValidator): asserts input is Record<string, V>;
export declare function assertIsRecord<V>(input: unknown, options: ValueValidator & ErrorMessage): asserts input is Record<string, V>;
export declare function assertIsRecord<K extends string | symbol, V>(input: unknown, options: ValueValidator & KeyValidator): asserts input is Record<K, V>;
export declare function assertIsRecord<K extends string | symbol, V>(input: unknown, options: ValueValidator & KeyValidator & ErrorMessage): asserts input is Record<K, V>;

@@ -15,2 +15,2 @@ /**

*/
export declare const assertIsRegExp: import("../types").TypeAssertion<RegExp, undefined>;
export declare const assertIsRegExp: import("../types").TypeAssertion<RegExp, import("../types").ErrorMessage>;

@@ -1,2 +0,2 @@

import { ValueValidator } from '../types';
import { ErrorMessage, ValueValidator } from '../types';
/**

@@ -17,2 +17,3 @@ * @category Type Assertion

export declare function assertIsSet(input: unknown): asserts input is Set<any>;
export declare function assertIsSet(input: unknown, options: ErrorMessage): asserts input is Set<any>;
export declare function assertIsSet<T>(input: unknown, options: ValueValidator): asserts input is Set<T>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsSharedArrayBuffer: import("../types").TypeAssertion<SharedArrayBuffer, undefined>;
export declare const assertIsSharedArrayBuffer: import("../types").TypeAssertion<SharedArrayBuffer, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsString: import("../types").TypeAssertion<string, undefined>;
export declare const assertIsString: import("../types").TypeAssertion<string, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsStringObject: import("../types").TypeAssertion<String, undefined>;
export declare const assertIsStringObject: import("../types").TypeAssertion<String, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsSymbol: import("../types").TypeAssertion<symbol, undefined>;
export declare const assertIsSymbol: import("../types").TypeAssertion<symbol, import("../types").ErrorMessage>;

@@ -6,3 +6,3 @@ import { TypedArray } from '../types';

*/
export declare const assertIsTypedArray: import("../types").TypeAssertion<TypedArray, undefined>;
export declare const assertIsTypedArray: import("../types").TypeAssertion<TypedArray, import("../types").ErrorMessage>;
/**

@@ -12,3 +12,3 @@ * @category Type Assertion

*/
export declare const assertIsInt8Array: import("../types").TypeAssertion<Int8Array, undefined>;
export declare const assertIsInt8Array: import("../types").TypeAssertion<Int8Array, import("../types").ErrorMessage>;
/**

@@ -18,3 +18,3 @@ * @category Type Assertion

*/
export declare const assertIsUint8Array: import("../types").TypeAssertion<Uint8Array, undefined>;
export declare const assertIsUint8Array: import("../types").TypeAssertion<Uint8Array, import("../types").ErrorMessage>;
/**

@@ -24,3 +24,3 @@ * @category Type Assertion

*/
export declare const assertIsUint8ClampedArray: import("../types").TypeAssertion<Uint8ClampedArray, undefined>;
export declare const assertIsUint8ClampedArray: import("../types").TypeAssertion<Uint8ClampedArray, import("../types").ErrorMessage>;
/**

@@ -30,3 +30,3 @@ * @category Type Assertion

*/
export declare const assertIsInt16Array: import("../types").TypeAssertion<Int16Array, undefined>;
export declare const assertIsInt16Array: import("../types").TypeAssertion<Int16Array, import("../types").ErrorMessage>;
/**

@@ -36,3 +36,3 @@ * @category Type Assertion

*/
export declare const assertIsUint16Array: import("../types").TypeAssertion<Uint16Array, undefined>;
export declare const assertIsUint16Array: import("../types").TypeAssertion<Uint16Array, import("../types").ErrorMessage>;
/**

@@ -42,3 +42,3 @@ * @category Type Assertion

*/
export declare const assertIsInt32Array: import("../types").TypeAssertion<Int32Array, undefined>;
export declare const assertIsInt32Array: import("../types").TypeAssertion<Int32Array, import("../types").ErrorMessage>;
/**

@@ -48,3 +48,3 @@ * @category Type Assertion

*/
export declare const assertIsUint32Array: import("../types").TypeAssertion<Uint32Array, undefined>;
export declare const assertIsUint32Array: import("../types").TypeAssertion<Uint32Array, import("../types").ErrorMessage>;
/**

@@ -54,3 +54,3 @@ * @category Type Assertion

*/
export declare const assertIsFloat32Array: import("../types").TypeAssertion<Float32Array, undefined>;
export declare const assertIsFloat32Array: import("../types").TypeAssertion<Float32Array, import("../types").ErrorMessage>;
/**

@@ -60,3 +60,3 @@ * @category Type Assertion

*/
export declare const assertIsFloat64Array: import("../types").TypeAssertion<Float64Array, undefined>;
export declare const assertIsFloat64Array: import("../types").TypeAssertion<Float64Array, import("../types").ErrorMessage>;
/**

@@ -66,3 +66,3 @@ * @category Type Assertion

*/
export declare const assertIsBigInt64Array: import("../types").TypeAssertion<BigInt64Array, undefined>;
export declare const assertIsBigInt64Array: import("../types").TypeAssertion<BigInt64Array, import("../types").ErrorMessage>;
/**

@@ -72,2 +72,2 @@ * @category Type Assertion

*/
export declare const assertIsBigUint64Array: import("../types").TypeAssertion<BigUint64Array, undefined>;
export declare const assertIsBigUint64Array: import("../types").TypeAssertion<BigUint64Array, import("../types").ErrorMessage>;

@@ -5,2 +5,2 @@ /**

*/
export declare const assertIsUndefined: import("../types").TypeAssertion<undefined, undefined>;
export declare const assertIsUndefined: import("../types").TypeAssertion<undefined, import("../types").ErrorMessage>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -5,2 +6,2 @@ * @category Type Assertion

*/
export declare function assertIsWeakMap<K extends object = any, V = unknown>(input: unknown): asserts input is WeakMap<K, V>;
export declare function assertIsWeakMap<K extends object = any, V = unknown>(input: unknown, options?: ErrorMessage): asserts input is WeakMap<K, V>;

@@ -0,1 +1,2 @@

import { ErrorMessage } from '../types';
/**

@@ -5,2 +6,2 @@ * @category Type Assertion

*/
export declare function assertIsWeakSet<T extends object = any>(input: unknown): asserts input is WeakSet<T>;
export declare function assertIsWeakSet<T extends object = any>(input: unknown, options?: ErrorMessage): asserts input is WeakSet<T>;

@@ -1,2 +0,2 @@

const t=t=>Object.prototype.toString.call(t);function n(t,n){return n?r=>t(r,n):n=>t(n)}function r(t){return(n,r)=>{if(!t(n,r))throw new TypeError}}function e(...t){return function(n,...r){for(const e of t)if(e(n,...r))return!0;return!1}}const o=n((t=>"bigint"==typeof t)),i=r(o),u=n((t=>void 0===t));function c(t){if(u(t))throw TypeError()}const a=n((t=>null===t));function f(t){if(a(t))throw TypeError()}function y(t){if(u(t)||a(t))throw TypeError()}const l=n((t=>"object"==typeof t&&null!==t)),b=n((n=>l(n)&&("[object ArrayBuffer]"===t(n)||n instanceof ArrayBuffer))),s=n((n=>l(n)&&("[object SharedArrayBuffer]"===t(n)||n instanceof SharedArrayBuffer))),g=e(b,s),S=r(g);function p(t,r){return n((t=>Array.isArray(t)&&(!r?.valueValidator||t.every(r.valueValidator))))(t)}function j(t,n){return r(p)(t,n)}const A=r(b);function d(r){return n((n=>"function"==typeof n&&"[object AsyncFunction]"===t(n)))(r)}function m(t){return r(d)(t)}function v(r){return n((n=>l(n)&&"[object AsyncGenerator]"===t(n)))(r)}function T(t){return r(v)(t)}function V(r){return n((n=>"function"==typeof n&&"[object AsyncGeneratorFunction]"===t(n)))(r)}function k(t){return r(V)(t)}function B(t){return n((t=>l(t)&&"function"==typeof Reflect.get(t,Symbol.asyncIterator)))(t)}function E(t){return r(B)(t)}const O=n((t=>"boolean"==typeof t)),h=r(O),w=n((n=>l(n)&&("[object Boolean]"===t(n)||n instanceof Boolean))),F=r(w),I=n((t=>"undefined"!=typeof Buffer&&t instanceof Buffer)),R=r(I),U=n((n=>l(n)&&("[object DataView]"===t(n)||n instanceof DataView))),x=r(U),D=n((n=>l(n)&&("[object Date]"===t(n)||n instanceof Date))),G=r(D);function M(r){return n((n=>l(n)&&("[object Error]"===t(n)||n instanceof Error)))(r)}function W(t){return r(M)(t)}function P(r){return n((n=>"function"==typeof n&&"[object Function]"===t(n)))(r)}function N(t){return r(P)(t)}function C(r){return n((n=>l(n)&&"[object Generator]"===t(n)))(r)}function q(t){return r(C)(t)}function z(r){return n((n=>"function"==typeof n&&"[object GeneratorFunction]"===t(n)))(r)}function H(t){return r(z)(t)}const J=n((t=>"string"==typeof t));function K(t){return n((t=>l(t)&&"function"==typeof Reflect.get(t,Symbol.iterator)||J(t)))(t)}function L(t){return r(K)(t)}function Q(t){return n((t=>l(t)&&"function"==typeof Reflect.get(t,"next")))(t)}function X(t){return r(Q)(t)}function Y(r,e){return n((n=>(n instanceof Map||l(n)&&"[object Map]"===t(n))&&(!e?.valueValidator||[...n.values()].every(e.valueValidator))&&(!e?.keyValidator||[...n.keys()].every(e.keyValidator))))(r)}function Z(t,n){return r(Y)(t,n)}const $=r(a),_=e(a,u),tt=r(_),nt=n((t=>"number"==typeof t)),rt=r(nt),et=n((n=>l(n)&&("[object Number]"===t(n)||n instanceof Number))),ot=r(et),it=r(l);function ut(t){return n((t=>t instanceof Promise||l(t)&&"function"==typeof Reflect.get(t,"then")))(t)}function ct(t){return r(ut)(t)}function at(r,e){return n((n=>l(n)&&"[object Object]"===t(n)&&(!e?.valueValidator||Object.values(n).every(e.valueValidator))&&(!e?.keyValidator||Object.keys(n).every(e.keyValidator))))(r)}function ft(t,n){return r(at)(t,n)}const yt=n((n=>l(n)&&("[object RegExp]"===t(n)||n instanceof RegExp))),lt=r(yt);function bt(r,e){return n((n=>l(n)&&("[object Set]"===t(n)||n instanceof Set)&&(!e?.valueValidator||[...n].every(e.valueValidator))))(r)}function st(t,n){return r(bt)(t,n)}const gt=r(s),St=r(J),pt=n((n=>l(n)&&("[object String]"===t(n)||n instanceof String))),jt=r(pt),At=n((t=>"symbol"==typeof t)),dt=r(At),mt=n((t=>t instanceof Object.getPrototypeOf(Int8Array)||t instanceof Object.getPrototypeOf(Uint8Array))),vt=t=>n((t=>mt(t)&&"Int8Array"===t[Symbol.toStringTag]))(t),Tt=t=>n((t=>mt(t)&&"Uint8Array"===t[Symbol.toStringTag]))(t),Vt=t=>n((t=>mt(t)&&"Uint8ClampedArray"===t[Symbol.toStringTag]))(t),kt=t=>n((t=>mt(t)&&"Int16Array"===t[Symbol.toStringTag]))(t),Bt=t=>n((t=>mt(t)&&"Uint16Array"===t[Symbol.toStringTag]))(t),Et=t=>n((t=>mt(t)&&"Int32Array"===t[Symbol.toStringTag]))(t),Ot=t=>n((t=>mt(t)&&"Uint32Array"===t[Symbol.toStringTag]))(t),ht=t=>n((t=>mt(t)&&"Float32Array"===t[Symbol.toStringTag]))(t),wt=t=>n((t=>mt(t)&&"Float64Array"===t[Symbol.toStringTag]))(t),Ft=t=>n((t=>mt(t)&&"BigInt64Array"===t[Symbol.toStringTag]))(t),It=t=>n((t=>mt(t)&&"BigUint64Array"===t[Symbol.toStringTag]))(t),Rt=r(mt),Ut=r(vt),xt=r(Tt),Dt=r(Vt),Gt=r(kt),Mt=r(Bt),Wt=r(Et),Pt=r(Ot),Nt=r(ht),Ct=r(wt),qt=r(Ft),zt=r(It),Ht=r(u);function Jt(r){return n((n=>n instanceof WeakMap||l(n)&&"[object WeakMap]"===t(n)))(r)}function Kt(t){return r(Jt)(t)}function Lt(r){return n((n=>n instanceof WeakSet||l(n)&&"[object WeakSet]"===t(n)))(r)}function Qt(t){return r(Lt)(t)}function Xt(t){return void 0!==t}function Yt(t){return null!==t}function Zt(t){return Xt(t)&&Yt(t)}export{S as assertIsAnyArrayBuffer,j as assertIsArray,A as assertIsArrayBuffer,m as assertIsAsyncFunction,T as assertIsAsyncGenerator,k as assertIsAsyncGeneratorFunction,E as assertIsAsyncIterable,i as assertIsBigInt,qt as assertIsBigInt64Array,zt as assertIsBigUint64Array,h as assertIsBoolean,F as assertIsBooleanObject,R as assertIsBuffer,x as assertIsDataView,G as assertIsDate,c as assertIsDefined,W as assertIsError,Nt as assertIsFloat32Array,Ct as assertIsFloat64Array,N as assertIsFunction,q as assertIsGenerator,H as assertIsGeneratorFunction,Gt as assertIsInt16Array,Wt as assertIsInt32Array,Ut as assertIsInt8Array,L as assertIsIterable,X as assertIsIterator,Z as assertIsMap,f as assertIsNotNull,y as assertIsNotNullish,$ as assertIsNull,tt as assertIsNullish,rt as assertIsNumber,ot as assertIsNumberObject,it as assertIsObject,ct as assertIsPromise,ft as assertIsRecord,lt as assertIsRegExp,st as assertIsSet,gt as assertIsSharedArrayBuffer,St as assertIsString,jt as assertIsStringObject,dt as assertIsSymbol,Rt as assertIsTypedArray,Mt as assertIsUint16Array,Pt as assertIsUint32Array,xt as assertIsUint8Array,Dt as assertIsUint8ClampedArray,Ht as assertIsUndefined,Kt as assertIsWeakMap,Qt as assertIsWeakSet,r as createTypeAssertion,n as createTypeGuard,g as isAnyArrayBuffer,p as isArray,b as isArrayBuffer,d as isAsyncFunction,v as isAsyncGenerator,V as isAsyncGeneratorFunction,B as isAsyncIterable,o as isBigInt,Ft as isBigInt64Array,It as isBigUint64Array,O as isBoolean,w as isBooleanObject,I as isBuffer,U as isDataView,D as isDate,Xt as isDefined,M as isError,ht as isFloat32Array,wt as isFloat64Array,P as isFunction,C as isGenerator,z as isGeneratorFunction,kt as isInt16Array,Et as isInt32Array,vt as isInt8Array,K as isIterable,Q as isIterator,Y as isMap,Yt as isNotNull,Zt as isNotNullish,a as isNull,_ as isNullish,nt as isNumber,et as isNumberObject,l as isObject,ut as isPromise,at as isRecord,yt as isRegExp,bt as isSet,s as isSharedArrayBuffer,J as isString,pt as isStringObject,At as isSymbol,mt as isTypedArray,Bt as isUint16Array,Ot as isUint32Array,Tt as isUint8Array,Vt as isUint8ClampedArray,u as isUndefined,e as isUnion,Jt as isWeakMap,Lt as isWeakSet};
const t=t=>Object.prototype.toString.call(t);function n(t,n){return n?r=>t(r,n):n=>t(n)}function r(t){return(n,r)=>{if(!t(n,r))throw new TypeError(r?.message)}}function e(...t){return function(n,...r){for(const e of t)if(e(n,...r))return!0;return!1}}const o=n((t=>"bigint"==typeof t)),i=r(o),u=n((t=>void 0===t));function c(t,n){if(u(t))throw TypeError(n?.message)}const a=n((t=>null===t));function f(t,n){if(a(t))throw TypeError(n?.message)}function y(t,n){if(u(t)||a(t))throw TypeError(n?.message)}const l=n((t=>"object"==typeof t&&null!==t)),s=n((n=>l(n)&&("[object ArrayBuffer]"===t(n)||n instanceof ArrayBuffer))),b=n((n=>l(n)&&("[object SharedArrayBuffer]"===t(n)||n instanceof SharedArrayBuffer))),g=e(s,b),S=r(g);function p(t,r){return n((t=>Array.isArray(t)&&(!r?.valueValidator||t.every(r.valueValidator))))(t)}function j(t,n){return r(p)(t,n)}const m=r(s);function A(r){return n((n=>"function"==typeof n&&"[object AsyncFunction]"===t(n)))(r)}function d(t,n){return r(A)(t,n)}function v(r){return n((n=>l(n)&&"[object AsyncGenerator]"===t(n)))(r)}function T(t,n){return r(v)(t,n)}function V(r){return n((n=>"function"==typeof n&&"[object AsyncGeneratorFunction]"===t(n)))(r)}function k(t,n){return r(V)(t,n)}function B(t){return n((t=>l(t)&&"function"==typeof Reflect.get(t,Symbol.asyncIterator)))(t)}function E(t,n){return r(B)(t,n)}const O=n((t=>"boolean"==typeof t)),h=r(O),w=n((n=>l(n)&&("[object Boolean]"===t(n)||n instanceof Boolean))),F=r(w),I=n((t=>"undefined"!=typeof Buffer&&t instanceof Buffer)),R=r(I),U=n((n=>l(n)&&("[object DataView]"===t(n)||n instanceof DataView))),x=r(U),D=n((n=>l(n)&&("[object Date]"===t(n)||n instanceof Date))),G=r(D);function M(r){return n((n=>l(n)&&("[object Error]"===t(n)||n instanceof Error)))(r)}function W(t,n){return r(M)(t,n)}function P(r){return n((n=>"function"==typeof n&&"[object Function]"===t(n)))(r)}function N(t,n){return r(P)(t,n)}function C(r){return n((n=>l(n)&&"[object Generator]"===t(n)))(r)}function q(t,n){return r(C)(t,n)}function z(r){return n((n=>"function"==typeof n&&"[object GeneratorFunction]"===t(n)))(r)}function H(t,n){return r(z)(t,n)}const J=n((t=>"string"==typeof t));function K(t){return n((t=>l(t)&&"function"==typeof Reflect.get(t,Symbol.iterator)||J(t)))(t)}function L(t,n){return r(K)(t,n)}function Q(t){return n((t=>l(t)&&"function"==typeof Reflect.get(t,"next")))(t)}function X(t,n){return r(Q)(t,n)}function Y(r,e){return n((n=>(n instanceof Map||l(n)&&"[object Map]"===t(n))&&(!e?.valueValidator||[...n.values()].every(e.valueValidator))&&(!e?.keyValidator||[...n.keys()].every(e.keyValidator))))(r)}function Z(t,n){return r(Y)(t,n)}const $=r(a),_=e(a,u),tt=r(_),nt=n((t=>"number"==typeof t)),rt=r(nt),et=n((n=>l(n)&&("[object Number]"===t(n)||n instanceof Number))),ot=r(et),it=r(l);function ut(t){return n((t=>t instanceof Promise||l(t)&&"function"==typeof Reflect.get(t,"then")))(t)}function ct(t,n){return r(ut)(t,n)}function at(r,e){return n((n=>l(n)&&"[object Object]"===t(n)&&(!e?.valueValidator||Object.values(n).every(e.valueValidator))&&(!e?.keyValidator||Object.keys(n).every(e.keyValidator))))(r)}function ft(t,n){return r(at)(t,n)}const yt=n((n=>l(n)&&("[object RegExp]"===t(n)||n instanceof RegExp))),lt=r(yt);function st(r,e){return n((n=>l(n)&&("[object Set]"===t(n)||n instanceof Set)&&(!e?.valueValidator||[...n].every(e.valueValidator))))(r)}function bt(t,n){return r(st)(t,n)}const gt=r(b),St=r(J),pt=n((n=>l(n)&&("[object String]"===t(n)||n instanceof String))),jt=r(pt),mt=n((t=>"symbol"==typeof t)),At=r(mt),dt=n((t=>t instanceof Object.getPrototypeOf(Int8Array)||t instanceof Object.getPrototypeOf(Uint8Array))),vt=t=>n((t=>dt(t)&&"Int8Array"===t[Symbol.toStringTag]))(t),Tt=t=>n((t=>dt(t)&&"Uint8Array"===t[Symbol.toStringTag]))(t),Vt=t=>n((t=>dt(t)&&"Uint8ClampedArray"===t[Symbol.toStringTag]))(t),kt=t=>n((t=>dt(t)&&"Int16Array"===t[Symbol.toStringTag]))(t),Bt=t=>n((t=>dt(t)&&"Uint16Array"===t[Symbol.toStringTag]))(t),Et=t=>n((t=>dt(t)&&"Int32Array"===t[Symbol.toStringTag]))(t),Ot=t=>n((t=>dt(t)&&"Uint32Array"===t[Symbol.toStringTag]))(t),ht=t=>n((t=>dt(t)&&"Float32Array"===t[Symbol.toStringTag]))(t),wt=t=>n((t=>dt(t)&&"Float64Array"===t[Symbol.toStringTag]))(t),Ft=t=>n((t=>dt(t)&&"BigInt64Array"===t[Symbol.toStringTag]))(t),It=t=>n((t=>dt(t)&&"BigUint64Array"===t[Symbol.toStringTag]))(t),Rt=r(dt),Ut=r(vt),xt=r(Tt),Dt=r(Vt),Gt=r(kt),Mt=r(Bt),Wt=r(Et),Pt=r(Ot),Nt=r(ht),Ct=r(wt),qt=r(Ft),zt=r(It),Ht=r(u);function Jt(r){return n((n=>n instanceof WeakMap||l(n)&&"[object WeakMap]"===t(n)))(r)}function Kt(t,n){return r(Jt)(t,n)}function Lt(r){return n((n=>n instanceof WeakSet||l(n)&&"[object WeakSet]"===t(n)))(r)}function Qt(t,n){return r(Lt)(t,n)}function Xt(t){return void 0!==t}function Yt(t){return null!==t}function Zt(t){return Xt(t)&&Yt(t)}export{S as assertIsAnyArrayBuffer,j as assertIsArray,m as assertIsArrayBuffer,d as assertIsAsyncFunction,T as assertIsAsyncGenerator,k as assertIsAsyncGeneratorFunction,E as assertIsAsyncIterable,i as assertIsBigInt,qt as assertIsBigInt64Array,zt as assertIsBigUint64Array,h as assertIsBoolean,F as assertIsBooleanObject,R as assertIsBuffer,x as assertIsDataView,G as assertIsDate,c as assertIsDefined,W as assertIsError,Nt as assertIsFloat32Array,Ct as assertIsFloat64Array,N as assertIsFunction,q as assertIsGenerator,H as assertIsGeneratorFunction,Gt as assertIsInt16Array,Wt as assertIsInt32Array,Ut as assertIsInt8Array,L as assertIsIterable,X as assertIsIterator,Z as assertIsMap,f as assertIsNotNull,y as assertIsNotNullish,$ as assertIsNull,tt as assertIsNullish,rt as assertIsNumber,ot as assertIsNumberObject,it as assertIsObject,ct as assertIsPromise,ft as assertIsRecord,lt as assertIsRegExp,bt as assertIsSet,gt as assertIsSharedArrayBuffer,St as assertIsString,jt as assertIsStringObject,At as assertIsSymbol,Rt as assertIsTypedArray,Mt as assertIsUint16Array,Pt as assertIsUint32Array,xt as assertIsUint8Array,Dt as assertIsUint8ClampedArray,Ht as assertIsUndefined,Kt as assertIsWeakMap,Qt as assertIsWeakSet,r as createTypeAssertion,n as createTypeGuard,g as isAnyArrayBuffer,p as isArray,s as isArrayBuffer,A as isAsyncFunction,v as isAsyncGenerator,V as isAsyncGeneratorFunction,B as isAsyncIterable,o as isBigInt,Ft as isBigInt64Array,It as isBigUint64Array,O as isBoolean,w as isBooleanObject,I as isBuffer,U as isDataView,D as isDate,Xt as isDefined,M as isError,ht as isFloat32Array,wt as isFloat64Array,P as isFunction,C as isGenerator,z as isGeneratorFunction,kt as isInt16Array,Et as isInt32Array,vt as isInt8Array,K as isIterable,Q as isIterator,Y as isMap,Yt as isNotNull,Zt as isNotNullish,a as isNull,_ as isNullish,nt as isNumber,et as isNumberObject,l as isObject,ut as isPromise,at as isRecord,yt as isRegExp,st as isSet,b as isSharedArrayBuffer,J as isString,pt as isStringObject,mt as isSymbol,dt as isTypedArray,Bt as isUint16Array,Ot as isUint32Array,Tt as isUint8Array,Vt as isUint8ClampedArray,u as isUndefined,e as isUnion,Jt as isWeakMap,Lt as isWeakSet};
//# sourceMappingURL=index.es.js.map

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=t=>Object.prototype.toString.call(t);function r(t,r){return r?e=>t(e,r):r=>t(r)}function e(t){return(r,e)=>{if(!t(r,e))throw new TypeError}}function s(...t){return function(r,...e){for(const s of t)if(s(r,...e))return!0;return!1}}const o=r((t=>"bigint"==typeof t)),n=e(o),a=r((t=>void 0===t));const i=r((t=>null===t));const u=r((t=>"object"==typeof t&&null!==t)),c=r((r=>u(r)&&("[object ArrayBuffer]"===t(r)||r instanceof ArrayBuffer))),p=r((r=>u(r)&&("[object SharedArrayBuffer]"===t(r)||r instanceof SharedArrayBuffer))),f=s(c,p),y=e(f);function x(t,e){return r((t=>Array.isArray(t)&&(!e?.valueValidator||t.every(e.valueValidator))))(t)}const l=e(c);function I(e){return r((r=>"function"==typeof r&&"[object AsyncFunction]"===t(r)))(e)}function b(e){return r((r=>u(r)&&"[object AsyncGenerator]"===t(r)))(e)}function A(e){return r((r=>"function"==typeof r&&"[object AsyncGeneratorFunction]"===t(r)))(e)}function g(t){return r((t=>u(t)&&"function"==typeof Reflect.get(t,Symbol.asyncIterator)))(t)}const S=r((t=>"boolean"==typeof t)),d=e(S),j=r((r=>u(r)&&("[object Boolean]"===t(r)||r instanceof Boolean))),m=e(j),B=r((t=>"undefined"!=typeof Buffer&&t instanceof Buffer)),v=e(B),T=r((r=>u(r)&&("[object DataView]"===t(r)||r instanceof DataView))),U=e(T),F=r((r=>u(r)&&("[object Date]"===t(r)||r instanceof Date))),N=e(F);function O(e){return r((r=>u(r)&&("[object Error]"===t(r)||r instanceof Error)))(e)}function V(e){return r((r=>"function"==typeof r&&"[object Function]"===t(r)))(e)}function k(e){return r((r=>u(r)&&"[object Generator]"===t(r)))(e)}function h(e){return r((r=>"function"==typeof r&&"[object GeneratorFunction]"===t(r)))(e)}const G=r((t=>"string"==typeof t));function E(t){return r((t=>u(t)&&"function"==typeof Reflect.get(t,Symbol.iterator)||G(t)))(t)}function D(t){return r((t=>u(t)&&"function"==typeof Reflect.get(t,"next")))(t)}function R(e,s){return r((r=>(r instanceof Map||u(r)&&"[object Map]"===t(r))&&(!s?.valueValidator||[...r.values()].every(s.valueValidator))&&(!s?.keyValidator||[...r.keys()].every(s.keyValidator))))(e)}const w=e(i),M=s(i,a),W=e(M),P=r((t=>"number"==typeof t)),C=e(P),_=r((r=>u(r)&&("[object Number]"===t(r)||r instanceof Number))),q=e(_),z=e(u);function H(t){return r((t=>t instanceof Promise||u(t)&&"function"==typeof Reflect.get(t,"then")))(t)}function J(e,s){return r((r=>u(r)&&"[object Object]"===t(r)&&(!s?.valueValidator||Object.values(r).every(s.valueValidator))&&(!s?.keyValidator||Object.keys(r).every(s.keyValidator))))(e)}const K=r((r=>u(r)&&("[object RegExp]"===t(r)||r instanceof RegExp))),L=e(K);function Q(e,s){return r((r=>u(r)&&("[object Set]"===t(r)||r instanceof Set)&&(!s?.valueValidator||[...r].every(s.valueValidator))))(e)}const X=e(p),Y=e(G),Z=r((r=>u(r)&&("[object String]"===t(r)||r instanceof String))),$=e(Z),tt=r((t=>"symbol"==typeof t)),rt=e(tt),et=r((t=>t instanceof Object.getPrototypeOf(Int8Array)||t instanceof Object.getPrototypeOf(Uint8Array))),st=t=>r((t=>et(t)&&"Int8Array"===t[Symbol.toStringTag]))(t),ot=t=>r((t=>et(t)&&"Uint8Array"===t[Symbol.toStringTag]))(t),nt=t=>r((t=>et(t)&&"Uint8ClampedArray"===t[Symbol.toStringTag]))(t),at=t=>r((t=>et(t)&&"Int16Array"===t[Symbol.toStringTag]))(t),it=t=>r((t=>et(t)&&"Uint16Array"===t[Symbol.toStringTag]))(t),ut=t=>r((t=>et(t)&&"Int32Array"===t[Symbol.toStringTag]))(t),ct=t=>r((t=>et(t)&&"Uint32Array"===t[Symbol.toStringTag]))(t),pt=t=>r((t=>et(t)&&"Float32Array"===t[Symbol.toStringTag]))(t),ft=t=>r((t=>et(t)&&"Float64Array"===t[Symbol.toStringTag]))(t),yt=t=>r((t=>et(t)&&"BigInt64Array"===t[Symbol.toStringTag]))(t),xt=t=>r((t=>et(t)&&"BigUint64Array"===t[Symbol.toStringTag]))(t),lt=e(et),It=e(st),bt=e(ot),At=e(nt),gt=e(at),St=e(it),dt=e(ut),jt=e(ct),mt=e(pt),Bt=e(ft),vt=e(yt),Tt=e(xt),Ut=e(a);function Ft(e){return r((r=>r instanceof WeakMap||u(r)&&"[object WeakMap]"===t(r)))(e)}function Nt(e){return r((r=>r instanceof WeakSet||u(r)&&"[object WeakSet]"===t(r)))(e)}function Ot(t){return void 0!==t}function Vt(t){return null!==t}exports.assertIsAnyArrayBuffer=y,exports.assertIsArray=function(t,r){return e(x)(t,r)},exports.assertIsArrayBuffer=l,exports.assertIsAsyncFunction=function(t){return e(I)(t)},exports.assertIsAsyncGenerator=function(t){return e(b)(t)},exports.assertIsAsyncGeneratorFunction=function(t){return e(A)(t)},exports.assertIsAsyncIterable=function(t){return e(g)(t)},exports.assertIsBigInt=n,exports.assertIsBigInt64Array=vt,exports.assertIsBigUint64Array=Tt,exports.assertIsBoolean=d,exports.assertIsBooleanObject=m,exports.assertIsBuffer=v,exports.assertIsDataView=U,exports.assertIsDate=N,exports.assertIsDefined=function(t){if(a(t))throw TypeError()},exports.assertIsError=function(t){return e(O)(t)},exports.assertIsFloat32Array=mt,exports.assertIsFloat64Array=Bt,exports.assertIsFunction=function(t){return e(V)(t)},exports.assertIsGenerator=function(t){return e(k)(t)},exports.assertIsGeneratorFunction=function(t){return e(h)(t)},exports.assertIsInt16Array=gt,exports.assertIsInt32Array=dt,exports.assertIsInt8Array=It,exports.assertIsIterable=function(t){return e(E)(t)},exports.assertIsIterator=function(t){return e(D)(t)},exports.assertIsMap=function(t,r){return e(R)(t,r)},exports.assertIsNotNull=function(t){if(i(t))throw TypeError()},exports.assertIsNotNullish=function(t){if(a(t)||i(t))throw TypeError()},exports.assertIsNull=w,exports.assertIsNullish=W,exports.assertIsNumber=C,exports.assertIsNumberObject=q,exports.assertIsObject=z,exports.assertIsPromise=function(t){return e(H)(t)},exports.assertIsRecord=function(t,r){return e(J)(t,r)},exports.assertIsRegExp=L,exports.assertIsSet=function(t,r){return e(Q)(t,r)},exports.assertIsSharedArrayBuffer=X,exports.assertIsString=Y,exports.assertIsStringObject=$,exports.assertIsSymbol=rt,exports.assertIsTypedArray=lt,exports.assertIsUint16Array=St,exports.assertIsUint32Array=jt,exports.assertIsUint8Array=bt,exports.assertIsUint8ClampedArray=At,exports.assertIsUndefined=Ut,exports.assertIsWeakMap=function(t){return e(Ft)(t)},exports.assertIsWeakSet=function(t){return e(Nt)(t)},exports.createTypeAssertion=e,exports.createTypeGuard=r,exports.isAnyArrayBuffer=f,exports.isArray=x,exports.isArrayBuffer=c,exports.isAsyncFunction=I,exports.isAsyncGenerator=b,exports.isAsyncGeneratorFunction=A,exports.isAsyncIterable=g,exports.isBigInt=o,exports.isBigInt64Array=yt,exports.isBigUint64Array=xt,exports.isBoolean=S,exports.isBooleanObject=j,exports.isBuffer=B,exports.isDataView=T,exports.isDate=F,exports.isDefined=Ot,exports.isError=O,exports.isFloat32Array=pt,exports.isFloat64Array=ft,exports.isFunction=V,exports.isGenerator=k,exports.isGeneratorFunction=h,exports.isInt16Array=at,exports.isInt32Array=ut,exports.isInt8Array=st,exports.isIterable=E,exports.isIterator=D,exports.isMap=R,exports.isNotNull=Vt,exports.isNotNullish=function(t){return Ot(t)&&Vt(t)},exports.isNull=i,exports.isNullish=M,exports.isNumber=P,exports.isNumberObject=_,exports.isObject=u,exports.isPromise=H,exports.isRecord=J,exports.isRegExp=K,exports.isSet=Q,exports.isSharedArrayBuffer=p,exports.isString=G,exports.isStringObject=Z,exports.isSymbol=tt,exports.isTypedArray=et,exports.isUint16Array=it,exports.isUint32Array=ct,exports.isUint8Array=ot,exports.isUint8ClampedArray=nt,exports.isUndefined=a,exports.isUnion=s,exports.isWeakMap=Ft,exports.isWeakSet=Nt;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=t=>Object.prototype.toString.call(t);function r(t,r){return r?e=>t(e,r):r=>t(r)}function e(t){return(r,e)=>{if(!t(r,e))throw new TypeError(e?.message)}}function s(...t){return function(r,...e){for(const s of t)if(s(r,...e))return!0;return!1}}const o=r((t=>"bigint"==typeof t)),n=e(o),a=r((t=>void 0===t));const i=r((t=>null===t));const u=r((t=>"object"==typeof t&&null!==t)),c=r((r=>u(r)&&("[object ArrayBuffer]"===t(r)||r instanceof ArrayBuffer))),p=r((r=>u(r)&&("[object SharedArrayBuffer]"===t(r)||r instanceof SharedArrayBuffer))),f=s(c,p),y=e(f);function x(t,e){return r((t=>Array.isArray(t)&&(!e?.valueValidator||t.every(e.valueValidator))))(t)}const l=e(c);function I(e){return r((r=>"function"==typeof r&&"[object AsyncFunction]"===t(r)))(e)}function b(e){return r((r=>u(r)&&"[object AsyncGenerator]"===t(r)))(e)}function A(e){return r((r=>"function"==typeof r&&"[object AsyncGeneratorFunction]"===t(r)))(e)}function g(t){return r((t=>u(t)&&"function"==typeof Reflect.get(t,Symbol.asyncIterator)))(t)}const S=r((t=>"boolean"==typeof t)),d=e(S),j=r((r=>u(r)&&("[object Boolean]"===t(r)||r instanceof Boolean))),m=e(j),B=r((t=>"undefined"!=typeof Buffer&&t instanceof Buffer)),v=e(B),T=r((r=>u(r)&&("[object DataView]"===t(r)||r instanceof DataView))),U=e(T),F=r((r=>u(r)&&("[object Date]"===t(r)||r instanceof Date))),N=e(F);function O(e){return r((r=>u(r)&&("[object Error]"===t(r)||r instanceof Error)))(e)}function V(e){return r((r=>"function"==typeof r&&"[object Function]"===t(r)))(e)}function k(e){return r((r=>u(r)&&"[object Generator]"===t(r)))(e)}function h(e){return r((r=>"function"==typeof r&&"[object GeneratorFunction]"===t(r)))(e)}const G=r((t=>"string"==typeof t));function E(t){return r((t=>u(t)&&"function"==typeof Reflect.get(t,Symbol.iterator)||G(t)))(t)}function D(t){return r((t=>u(t)&&"function"==typeof Reflect.get(t,"next")))(t)}function R(e,s){return r((r=>(r instanceof Map||u(r)&&"[object Map]"===t(r))&&(!s?.valueValidator||[...r.values()].every(s.valueValidator))&&(!s?.keyValidator||[...r.keys()].every(s.keyValidator))))(e)}const w=e(i),M=s(i,a),W=e(M),P=r((t=>"number"==typeof t)),C=e(P),_=r((r=>u(r)&&("[object Number]"===t(r)||r instanceof Number))),q=e(_),z=e(u);function H(t){return r((t=>t instanceof Promise||u(t)&&"function"==typeof Reflect.get(t,"then")))(t)}function J(e,s){return r((r=>u(r)&&"[object Object]"===t(r)&&(!s?.valueValidator||Object.values(r).every(s.valueValidator))&&(!s?.keyValidator||Object.keys(r).every(s.keyValidator))))(e)}const K=r((r=>u(r)&&("[object RegExp]"===t(r)||r instanceof RegExp))),L=e(K);function Q(e,s){return r((r=>u(r)&&("[object Set]"===t(r)||r instanceof Set)&&(!s?.valueValidator||[...r].every(s.valueValidator))))(e)}const X=e(p),Y=e(G),Z=r((r=>u(r)&&("[object String]"===t(r)||r instanceof String))),$=e(Z),tt=r((t=>"symbol"==typeof t)),rt=e(tt),et=r((t=>t instanceof Object.getPrototypeOf(Int8Array)||t instanceof Object.getPrototypeOf(Uint8Array))),st=t=>r((t=>et(t)&&"Int8Array"===t[Symbol.toStringTag]))(t),ot=t=>r((t=>et(t)&&"Uint8Array"===t[Symbol.toStringTag]))(t),nt=t=>r((t=>et(t)&&"Uint8ClampedArray"===t[Symbol.toStringTag]))(t),at=t=>r((t=>et(t)&&"Int16Array"===t[Symbol.toStringTag]))(t),it=t=>r((t=>et(t)&&"Uint16Array"===t[Symbol.toStringTag]))(t),ut=t=>r((t=>et(t)&&"Int32Array"===t[Symbol.toStringTag]))(t),ct=t=>r((t=>et(t)&&"Uint32Array"===t[Symbol.toStringTag]))(t),pt=t=>r((t=>et(t)&&"Float32Array"===t[Symbol.toStringTag]))(t),ft=t=>r((t=>et(t)&&"Float64Array"===t[Symbol.toStringTag]))(t),yt=t=>r((t=>et(t)&&"BigInt64Array"===t[Symbol.toStringTag]))(t),xt=t=>r((t=>et(t)&&"BigUint64Array"===t[Symbol.toStringTag]))(t),lt=e(et),It=e(st),bt=e(ot),At=e(nt),gt=e(at),St=e(it),dt=e(ut),jt=e(ct),mt=e(pt),Bt=e(ft),vt=e(yt),Tt=e(xt),Ut=e(a);function Ft(e){return r((r=>r instanceof WeakMap||u(r)&&"[object WeakMap]"===t(r)))(e)}function Nt(e){return r((r=>r instanceof WeakSet||u(r)&&"[object WeakSet]"===t(r)))(e)}function Ot(t){return void 0!==t}function Vt(t){return null!==t}exports.assertIsAnyArrayBuffer=y,exports.assertIsArray=function(t,r){return e(x)(t,r)},exports.assertIsArrayBuffer=l,exports.assertIsAsyncFunction=function(t,r){return e(I)(t,r)},exports.assertIsAsyncGenerator=function(t,r){return e(b)(t,r)},exports.assertIsAsyncGeneratorFunction=function(t,r){return e(A)(t,r)},exports.assertIsAsyncIterable=function(t,r){return e(g)(t,r)},exports.assertIsBigInt=n,exports.assertIsBigInt64Array=vt,exports.assertIsBigUint64Array=Tt,exports.assertIsBoolean=d,exports.assertIsBooleanObject=m,exports.assertIsBuffer=v,exports.assertIsDataView=U,exports.assertIsDate=N,exports.assertIsDefined=function(t,r){if(a(t))throw TypeError(r?.message)},exports.assertIsError=function(t,r){return e(O)(t,r)},exports.assertIsFloat32Array=mt,exports.assertIsFloat64Array=Bt,exports.assertIsFunction=function(t,r){return e(V)(t,r)},exports.assertIsGenerator=function(t,r){return e(k)(t,r)},exports.assertIsGeneratorFunction=function(t,r){return e(h)(t,r)},exports.assertIsInt16Array=gt,exports.assertIsInt32Array=dt,exports.assertIsInt8Array=It,exports.assertIsIterable=function(t,r){return e(E)(t,r)},exports.assertIsIterator=function(t,r){return e(D)(t,r)},exports.assertIsMap=function(t,r){return e(R)(t,r)},exports.assertIsNotNull=function(t,r){if(i(t))throw TypeError(r?.message)},exports.assertIsNotNullish=function(t,r){if(a(t)||i(t))throw TypeError(r?.message)},exports.assertIsNull=w,exports.assertIsNullish=W,exports.assertIsNumber=C,exports.assertIsNumberObject=q,exports.assertIsObject=z,exports.assertIsPromise=function(t,r){return e(H)(t,r)},exports.assertIsRecord=function(t,r){return e(J)(t,r)},exports.assertIsRegExp=L,exports.assertIsSet=function(t,r){return e(Q)(t,r)},exports.assertIsSharedArrayBuffer=X,exports.assertIsString=Y,exports.assertIsStringObject=$,exports.assertIsSymbol=rt,exports.assertIsTypedArray=lt,exports.assertIsUint16Array=St,exports.assertIsUint32Array=jt,exports.assertIsUint8Array=bt,exports.assertIsUint8ClampedArray=At,exports.assertIsUndefined=Ut,exports.assertIsWeakMap=function(t,r){return e(Ft)(t,r)},exports.assertIsWeakSet=function(t,r){return e(Nt)(t,r)},exports.createTypeAssertion=e,exports.createTypeGuard=r,exports.isAnyArrayBuffer=f,exports.isArray=x,exports.isArrayBuffer=c,exports.isAsyncFunction=I,exports.isAsyncGenerator=b,exports.isAsyncGeneratorFunction=A,exports.isAsyncIterable=g,exports.isBigInt=o,exports.isBigInt64Array=yt,exports.isBigUint64Array=xt,exports.isBoolean=S,exports.isBooleanObject=j,exports.isBuffer=B,exports.isDataView=T,exports.isDate=F,exports.isDefined=Ot,exports.isError=O,exports.isFloat32Array=pt,exports.isFloat64Array=ft,exports.isFunction=V,exports.isGenerator=k,exports.isGeneratorFunction=h,exports.isInt16Array=at,exports.isInt32Array=ut,exports.isInt8Array=st,exports.isIterable=E,exports.isIterator=D,exports.isMap=R,exports.isNotNull=Vt,exports.isNotNullish=function(t){return Ot(t)&&Vt(t)},exports.isNull=i,exports.isNullish=M,exports.isNumber=P,exports.isNumberObject=_,exports.isObject=u,exports.isPromise=H,exports.isRecord=J,exports.isRegExp=K,exports.isSet=Q,exports.isSharedArrayBuffer=p,exports.isString=G,exports.isStringObject=Z,exports.isSymbol=tt,exports.isTypedArray=et,exports.isUint16Array=it,exports.isUint32Array=ct,exports.isUint8Array=ot,exports.isUint8ClampedArray=nt,exports.isUndefined=a,exports.isUnion=s,exports.isWeakMap=Ft,exports.isWeakSet=Nt;
//# sourceMappingURL=index.js.map

@@ -8,6 +8,10 @@ export declare type TypeValidator = (input: unknown, ...args: any[]) => boolean;

};
export declare type ErrorMessage = {
message: string | undefined;
};
export declare type TypeGuardOptions = Partial<ValueValidator & KeyValidator>;
export declare type TypeAssertionOptions = TypeGuardOptions & Partial<ErrorMessage>;
export declare type TypeGuard<T, O extends TypeGuardOptions | undefined = undefined> = (input: unknown, options?: O) => input is T;
export declare type TypeAssertion<T, O extends TypeGuardOptions | undefined = undefined> = (input: unknown, options?: O) => asserts input is T;
export declare type TypeAssertion<T, O extends TypeAssertionOptions | undefined = undefined> = (input: unknown, options?: O) => asserts input is T;
export declare type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | BigUint64Array | BigInt64Array | Float32Array | Float64Array;
export declare type TypedGeneratorFunction<Y, R, N> = (...args: any[]) => Generator<Y, R, N>;

@@ -1,2 +0,2 @@

import { TypeAssertion, TypeGuard, TypeGuardOptions, TypeValidator } from './types';
import { ErrorMessage, TypeAssertion, TypeAssertionOptions, TypeGuard, TypeGuardOptions, TypeValidator } from './types';
export declare const toObjectString: (value: unknown) => string;

@@ -25,3 +25,3 @@ /**

*/
export declare function createTypeAssertion<T, O extends TypeGuardOptions | undefined = undefined>(guard: TypeGuard<T, O>): TypeAssertion<T, O>;
export declare function createTypeAssertion<T, O extends TypeAssertionOptions | undefined = ErrorMessage>(guard: TypeGuard<T, any>): TypeAssertion<T, O>;
/**

@@ -28,0 +28,0 @@ * @category Utility

{
"name": "@tool-belt/type-predicates",
"version": "1.1.0",
"version": "1.2.0",
"description": "Collection of performant type-guard utilities",

@@ -46,3 +46,3 @@ "repository": {

"@rollup/plugin-typescript": "^8.2.5",
"@sprylab/eslint-config": "^1.5.4",
"@sprylab/eslint-config": "^1.5.6",
"@types/jest": "^27.0.1",

@@ -54,13 +54,13 @@ "all-contributors-cli": "^6.20.0",

"husky": ">=7",
"jest": "^27.0.6",
"jest": "^27.1.0",
"lint-staged": ">=11",
"prettier": "^2.3.2",
"prettier-plugin-jsdoc": "^0.3.23",
"prettier-plugin-jsdoc": "^0.3.24",
"rimraf": "^3.0.2",
"rollup": "^2.56.2",
"rollup": "2.56.2",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^27.0.4",
"ts-node": "^10.2.0",
"typedoc": "^0.21.5",
"typescript": "^4.3.5"
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typedoc": "^0.21.9",
"typescript": "4.3.5"
},

@@ -67,0 +67,0 @@ "lint-staged": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc