{"version":3,"file":"index.umd.cjs","sources":["../src/inspect.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/**\n * Runtime type-checking\n * For checking against data from external sources.\n *\n * `Inspect` checks if a value matches a given type.\n * `Validate` verifies that a value is within some constraints.\n * `Parse` parses a string using a given grammar into some structure, or throws an error.\n */\ntype int = number;\ntype byte = number;\ntype Class<T> = new (...args: any[]) => T;\n\ninterface Struct<T> {\n    [name: string]: T;\n    [name: number]: T;\n    [name: symbol]: T;\n}\n\nexport type Inspector<T> = (value: any) => value is T;\nexport type Inspected<T> = T extends Inspector<infer R> ? R : never;\nexport type Predicate<T> = (value: T) => boolean;\nexport type CheckType<T> = T extends (value: any) => value is infer R ? R : never;\nexport type Shape<T> = { [K in keyof T]-?: Inspector<T[K]> };\n\n// get the indexes of a tuple. ArgIndex<[\"foo\", \"bar\", \"baz\"]> ==> \"0\" | \"1\" | \"2\"\ntype ArgIndex<T> = Exclude<keyof T, keyof Array<any>>;\n// TupleUnion<[Inspector<A>, Inspector<B>, Inspector<C>]>; ==> { \"0\": A, \"1\": B, \"2\": C }\ntype ArgTypes<T> = { [K in ArgIndex<T>]: CheckType<T[K]> };\n// A | B | C\ntype TupleUnion<T> = { [K in keyof T]: T[K] }[keyof T];\n\ntype Union<T> = TupleUnion<ArgTypes<T>>;\ntype Tuple<T> = { [K in keyof T]: CheckType<T[K]> };\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;\n\n/*----------------------------------------------------------------------\n    Lazy Inspector\n----------------------------------------------------------------------*/\n\n/**\n * A lazy inspector, so you can reference other inspectors out of\n * declare sequence.\n *\n * @example\n * const isFoo = isObjectOf({\n *     a: isBar,            // error: used before being assigned\n *     b: is(() => isBar),  // ok\n * });\n *\n * const isBar = isObjectOf({ ... });\n */\nexport function is<T>(lazy: () => Inspector<T>): Inspector<T> {\n    return (x: any): x is T => {\n        const isT = lazy();\n        return isT(x);\n    };\n}\n\n/*----------------------------------------------------------------------\n    Basic Inspectors\n----------------------------------------------------------------------*/\n\n/**\n * Always returns true\n * @param x value to inspect\n */\nexport function isAny(x: any): x is any {\n    return true;\n}\n\n/**\n * Always returns false\n * @param x value to inspect\n */\nexport function isNever(x: any): x is never {\n    return false;\n}\n\n/**\n * Checks if x is null, undefined, number, string, or boolean\n * @param x value to inspect\n * @returns true if x is a primitive value\n */\nexport function isPrimitive(x: any): x is null | undefined | number | string | boolean {\n    return isNullish(x) || isNumber(x) || isString(x) || isBoolean(x);\n}\n\n/**\n * Checks if x is undefined\n * @param x value to inspect\n */\nexport function isUndefined(x: any): x is undefined {\n    return x === undefined;\n}\n\n/**\n * Checks if x is a null value\n * @param x value to inspect\n */\nexport function isNull(x: any): x is null {\n    return x === null;\n}\n\n/**\n * Checks if x is either null or undefined\n * @param x value to inspect\n */\nexport function isNullish(x: any): x is undefined | null {\n    // non-strict equality will be true for undefined as well\n    return x == null;\n}\n\n/**\n * Checks if x is a boolean\n * @param x value to inspect\n */\nexport function isBoolean(x: any): x is boolean {\n    return x === true || x === false;\n}\n\n/**\n * Checks if x is any number type\n * @param x value to inspect\n */\nexport function isNumber(x: any): x is number {\n    return typeof x === \"number\";\n}\n\n/**\n * Checks if x is an int\n * @param x value to inspect\n */\nexport function isInt(x: any): x is int {\n    return Number.isInteger(x);\n}\n\n/**\n * Checks if x is an unsigned 32-bit int\n * @param x value to inspect\n */\nexport function isUInt32(x: any): x is int {\n    return x >>> 0 === x;\n}\n\n/**\n * Checks if x is an integer between 0 and 255 inclusive.\n * @param x value to inspect\n */\nexport function isUInt8(x: any): x is byte {\n    return Number.isInteger(x) && x >= 0 && x <= 255;\n}\n\n/**\n * Checks if x is a bigint\n * @param x value to inspect\n */\nexport function isBigInt(x: any): x is bigint {\n    return typeof x === \"bigint\";\n}\n\n/**\n * Checks if x is a string\n * @param x value to inspect\n */\nexport function isString(x: any): x is string {\n    return typeof x === \"string\" || x instanceof String;\n}\n\n/**\n * Checks if x is an Array\n * Does not check type of individual values.\n * Use isArrayLike for non Array objects but behaves like one\n * @param x value to inspect\n */\nexport function isArray<T = any>(x: any): x is T[] {\n    return x instanceof Array;\n}\n\n/**\n * Checks if x is a RegExp\n * @param x value to inspect\n */\nexport function isRegExp(x: any): x is RegExp {\n    return x instanceof RegExp;\n}\n\n/**\n * Checks if x is a Function.\n * Passing in an ES6 Class will also return true.\n * @param x value to inspect\n */\nexport function isFunction<A extends any[], R = any>(x: any): x is (...a: A) => R {\n    return x instanceof Function || typeof x === \"function\";\n}\n\nconst rxClass = /^class[\\s{]/;\n\n/**\n * Checks if x is an ES6 class.\n * DOES NOT WORK IF CLASS WAS TRANSPILED TO ES5 AND BELOW\n * @param x value to inspect\n */\nexport function isClass<T>(x: any): x is Class<T> {\n    if (typeof x !== \"function\") return false;\n    const strFn = Function.prototype.toString.call(x);\n    return rxClass.test(strFn);\n}\n\n/**\n * Checks if x is an instance of a class or plain object\n * @param x value to inspect\n */\nexport function isObject<T = object>(x: any): x is T {\n    // need to check for null because typeof null is also object\n    return x !== null && typeof x === \"object\";\n}\n\n/**\n * Checks if x is a plain object (not an instance of a class)\n * Use this instead of isPlainObject\n * @param x value to inspect\n */\nexport function isStruct<T>(x: any): x is Struct<T> {\n    return isObject(x) && [Object.prototype, null].includes(Object.getPrototypeOf(x));\n}\n\n/**\n * Checks if x is a plain object (not an instance of a class)\n * Use this instead of isPlainObject\n * @param x value to inspect\n */\nexport function isRecord<K extends keyof any, V>(x: any): x is Record<K, V> {\n    return isStruct(x);\n}\n\n/**\n * Checks if x is a plain object (not an instance of a class)\n * @deprecated use isStruct\n * @param x value to inspect\n */\nexport function isPlainObject<T>(x: any): x is Struct<T> {\n    return isObject(x) && (x as any).__proto__ === Object.prototype;\n}\n\n/**\n * Checks if x is an instance of a class (but not a plain object)\n * Use isInstanceOf to check if it is an instance of a specific class.\n * @param x value to inspect\n */\nexport function isInstance<T = object>(x: any): x is T {\n    return isObject(x) && !isStruct(x);\n}\n\n/**\n * Checks if x is an Iterable.\n * @param x value to inspect\n */\nexport function isIterable<T = any>(x: any): x is Iterable<T> {\n    return x != null && typeof x[Symbol.iterator] === \"function\";\n}\n\n/**\n * Checks if x has the shape of an Iterator.\n * @param x value to inspect\n */\nexport function isIterator<T = any>(x: any): x is Iterator<T> {\n    return x != null && typeof x.next === \"function\";\n}\n\n/*----------------------------------------------------------------------\n    Higher-Order Inspectors\n----------------------------------------------------------------------*/\n\n/**\n * T | undefined\n */\nexport function isOptional<T>(isT: Inspector<T>): Inspector<T | undefined> {\n    return isAnyOf(isUndefined, isT);\n}\n\n/**\n * T | null\n */\nexport function isNullable<T>(isT: Inspector<T>): Inspector<T | null> {\n    return isAnyOf(isNull, isT);\n}\n\n/**\n * Creates an inspector that flips the outcome of another inspector\n * @example\n * isNot(isInteger)(5) // false\n */\nexport function isNot<T>(isT: Inspector<T>): Inspector<any> {\n    // using `any` because it is not possible to do type negation in TypeScript\n    return (x: any): x is any => !isT(x);\n}\n\n/**\n * Creates an inspector that checks that x is exactly a particular value.\n * @example\n * isExact(5)(x) // x is 5\n */\nexport function isExact<T>(value: T): Inspector<T> {\n    return (x: any): x is T => x === value;\n}\n\n/**\n * Creates an inspector that checks that x is exactly a particular value.\n * Typed version of isExact\n */\nexport function isStringOf<T extends string>(value: T): Inspector<T> {\n    return (x: any): x is T => x === value;\n}\n\n/**\n * Creates an inspector that checks that x is exactly a particular value.\n * Typed version of isExact\n */\nexport function isNumberOf<T extends number>(value: T): Inspector<T> {\n    return (x: any): x is T => x === value;\n}\n\n/**\n * Creates an inspector that checks that x is exactly a particular value.\n * Typed version of isExact\n */\nexport function isBooleanOf<T extends boolean>(value: T): Inspector<T> {\n    return (x: any): x is T => x === value;\n}\n\n/**\n * Creates an inspector that checks that x is an instance of a particular class.\n * @example\n * isInstanceOf(Foo)(x) // x is Foo\n */\nexport function isInstanceOf<T>(type: Class<T>): Inspector<T> {\n    return (x: any): x is T => x instanceof (type as any);\n}\n\n/**\n * Creates an inspector that checks that x is an Iterable and every value of\n * x is of a particular type\n * As a limitation of run-time type checking, an empty iterable is always true.\n * @example\n * isIterableOf(isString)(x) // x is Iterable<string>\n */\nexport function isIterableOf<T>(isT: Inspector<T>): Inspector<Iterable<T>> {\n    return (x: any): x is Iterable<T> => {\n        if (!isIterable(x)) return false;\n        if (isT === isNever) return false;\n        if (isT === isAny) return true;\n        for (const v of x) if (!isT(v)) return false;\n        return true;\n    };\n}\n\n/**\n * Creates an inspector that checks that x is an Array and every value of\n * x is of a particular type\n * @example\n * isArrayOf(isString)(x) // x is string[]\n */\nexport function isArrayOf<T>(isT: Inspector<T>): Inspector<T[]> {\n    return (x: any): x is T[] => {\n        return isArray(x) && isIterableOf(isT)(x);\n    };\n}\n\n/**\n * Creates an inspector that checks that x is an Set and every value of\n * x is of a particular type\n * @example\n * isSetOf(isString)(x) // x is Set<string>\n */\nexport function isSetOf<T>(isT: Inspector<T>): Inspector<Set<T>> {\n    return (x: any): x is Set<T> => {\n        return isSet(x) && isIterableOf(isT)(x);\n    };\n}\n\n/**\n * Creates an inspector that checks that x is a Map and every key and value of\n * x is of a particular type\n * @param isK Inspector for the key type\n * @param isV Inspector for the value type\n * @returns An inspector function that checks if a value is a Map with the specified key and value types\n * @example\n * isMapOf(isString, isNumber)(x) // x is Map<string, number>\n */\nexport function isMapOf<K, V>(isK: Inspector<K>, isV: Inspector<V>): Inspector<Map<K, V>> {\n    return (x: any): x is Map<K, V> => {\n        return isMap(x) && isIterableOf(isK)(x.keys()) && isIterableOf(isV)(x.values());\n    };\n}\n\n/**\n * Creates an inspector that checks that x is a Record object and every key and value of\n * x matches the specified inspector types\n * @param isK Inspector for the key type\n * @param isV Inspector for the value type\n * @returns An inspector function that checks if a value is a Record with the specified key and value types\n * @example\n * isRecordOf(isString, isNumber)(x) // x is Record<string, number>\n */\nexport function isRecordOf<K extends keyof any, V>(isK: Inspector<K>, isV: Inspector<V>): Inspector<Record<K, V>> {\n    return (x: any): x is Record<K, V> => {\n        return isRecord(x) && isIterableOf(isTupleOf(isK, isV))(Object.entries(x));\n    };\n}\n\n/**\n * Creates an inspector that checks that x matches at least 1 of the given inspectors.\n * This is equivalent to the union type.\n * @example\n * isAnyOf(isA, isB, isC)(x) // x is A | B | C\n */\nexport function isAnyOf<T extends Inspector<any>[]>(...inspectors: T): Inspector<Union<T>> {\n    return (x: any): x is Union<T> => {\n        return inspectors.some(isT => isT(x));\n    };\n}\n\n/**\n * Creates an inspector that checks that x matches all of the given inspectors.\n * This is equivalent to the intersection type.\n * @example\n * isAllOf(isA, isB, isC)(x) // x is A & B & C\n */\nexport function isAllOf<T extends Inspector<any>[]>(...inspectors: T): Inspector<UnionToIntersection<Union<T>>> {\n    return (x: any): x is UnionToIntersection<Union<T>> => {\n        return inspectors.every(isT => isT(x));\n    };\n}\n\n/**\n * Creates an inspector that checks that x is an array containing a specific\n * sequence of types.\n * @example\n * isTupleOf(isString, isNumber, isNull)(x) // x is [string, number, null]\n */\nexport function isTupleOf<T extends Inspector<any>[]>(...inspectors: T): Inspector<Tuple<T>> {\n    return (x: any): x is Tuple<T> => {\n        if (!isArray(x)) {\n            return false;\n        }\n        for (let i = 0; i < inspectors.length; ++i) {\n            if (!inspectors[i](x[i])) {\n                return false;\n            }\n        }\n        return true;\n    };\n}\n\n/**\n * Creates an inspector that checks that x has a certain shape.\n * @example\n * isObjectOf<Foo>(fooShape)(x) // x is Foo\n */\nexport function isObjectOf<T>(type: Shape<T>): Inspector<T> {\n    return (x: any): x is T => {\n        if (!isObject<Struct<any>>(x)) return false;\n        for (const [key, isV] of Object.entries<Inspector<any>>(type)) {\n            if (!isV(x[key])) return false;\n        }\n        return true;\n    };\n}\n\n/*----------------------------------------------------------------------\n    Built-in Type Inspector\n----------------------------------------------------------------------*/\n\n/**\n * Checks if x is an instance of a Date object\n * @param x value to inspect\n * @returns true if x is a Date object\n */\nexport function isDate(x: any): x is Date {\n    return x instanceof Date;\n}\n\n/**\n * Checks if x is an instance of a Set object\n * @param x value to inspect\n * @returns true if x is a Set object\n */\nexport function isSet<T = any>(x: any): x is Set<T> {\n    return x instanceof Set;\n}\n\n/**\n * Checks if x is an instance of a Map object\n * @param x value to inspect\n * @returns true if x is a Map object\n */\nexport function isMap<K = any, V = any>(x: any): x is Map<K, V> {\n    return x instanceof Map;\n}\n\n/**\n * Checks if x is a Promise object\n * @param x value to inspect\n * @returns true if x is a Promise object\n */\nexport function isPromise<T = any>(x: any): x is Promise<T> {\n    return x instanceof Promise;\n}\n\n/**\n * Checks if x is an array-like object\n * @param x value to inspect\n * @returns true if x is an Array or has a numeric length property\n */\nexport function isArrayLike<T = any>(x: any): x is ArrayLike<T> {\n    if (!x) return false;\n    if (x instanceof Array || Array.isArray(x)) return true;\n    if (!Number.isInteger(x.length)) return false;\n    return true;\n}\n\n/**\n * Checks if x is a Promise-like object\n * @param x value to inspect\n * @returns true if x is a Promise or has a then method\n */\nexport function isPromiseLike<T = any>(x: any): x is PromiseLike<T> {\n    if (!x) return false;\n    if (x instanceof Promise) return true;\n    if (typeof x.then !== \"function\") return false;\n    return true;\n}\n\n/*----------------------------------------------------------------------\n    Extended Type Inspector\n----------------------------------------------------------------------*/\n\n/**\n * Creates an inspector that checks if a number is within a specific range\n * @param min Minimum value (inclusive)\n * @param max Maximum value (inclusive)\n */\nexport function isNumberBetween(min: number, max: number): Inspector<number> {\n    return (x: any): x is number => isNumber(x) && x >= min && x <= max;\n}\n\n/**\n * Checks if x is a non-empty array\n */\nexport function isNonEmptyArray<T = any>(x: any): x is [T, ...T[]] {\n    return isArray(x) && x.length > 0;\n}\n\n/**\n * Creates an inspector that checks if x is a non-empty array of a specific type\n */\nexport function isNonEmptyArrayOf<T>(isT: Inspector<T>): Inspector<[T, ...T[]]> {\n    return (x: any): x is [T, ...T[]] => isArrayOf(isT)(x) && x.length > 0;\n}\n\n/**\n * Creates an inspector that refines another inspector with additional constraints\n * @param isT Base type inspector\n * @param predicates One or more additional constraints (predicates) that must all be satisfied\n * @returns An inspector that checks if a value matches the base type and satisfies all predicates\n * @example\n * // Single predicate\n * const isPositiveNumber = isRefined(isNumber, (n) => n > 0);\n *\n * // Multiple predicates\n * const isPositiveEvenNumber = isRefined(isNumber,\n *     (n) => n > 0,\n *     (n) => n % 2 === 0\n * );\n *\n * // Complex object validation\n * type User = { age: number, role: string };\n * const isAdmin = isRefined(\n *     isObjectOf<User>({ age: isNumber, role: isString }),\n *     (user) => user.age >= 18,\n *     (user) => user.role === 'admin'\n * );\n */\nexport function isRefined<T>(isT: Inspector<T>, ...predicates: Predicate<T>[]): Inspector<T> {\n    return (x: any): x is T => isT(x) && predicates.every(cond => cond(x));\n}\n\n/**\n * Creates an inspector that checks if x contains a partial subset of the specified shape\n * (requires only the properties that are present to match their types)\n * @param type Shape definition to partially match against\n * @returns An inspector for objects that match a partial subset of the specified shape\n * @example\n * // Define a shape for a User\n * type User = { id: string, name: string, email: string };\n * const userShape = { id: isString, name: isString, email: isString };\n *\n * const isPartialUser = isPartialOf(userShape);\n *\n * isPartialUser({ id: \"123\" }); // true - subset of properties\n * isPartialUser({ name: \"John\" }); // true - subset of properties\n * isPartialUser({ id: 123 }); // false - wrong type\n */\nexport function isPartialOf<T>(type: Shape<T>): Inspector<Partial<T>> {\n    return (x: any): x is Partial<T> => {\n        if (!isObject<Struct<any>>(x)) return false;\n\n        for (const key in x) {\n            // If this key is in the shape and has a validator\n            if (key in type) {\n                const isV = type[key as keyof T];\n                if (!isV(x[key])) return false;\n            }\n        }\n        return true;\n    };\n}\n"],"names":[],"mappings":";;;;AAsDO,WAAS,GAAM,MAAwC;AAC1D,WAAO,CAAC,MAAmB;AACvB,YAAM,MAAM,KAAK;AACjB,aAAO,IAAI,CAAC;AAAA,IAChB;AAAA,EACJ;AAUO,WAAS,MAAM,GAAkB;AAC7B,WAAA;AAAA,EACX;AAMO,WAAS,QAAQ,GAAoB;AACjC,WAAA;AAAA,EACX;AAOO,WAAS,YAAY,GAA2D;AAC5E,W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