ts-data-forge
Version:
[](https://www.npmjs.com/package/ts-data-forge) [](https://www.npmjs.com/package/ts-data-forge) [
* - Excludes object types, arrays, functions, and other non-primitive values
* - Includes `null` despite its misleading `typeof` result
*
* @example
*
* ```ts
* const values: readonly unknown[] = [42, 'Ada', null, { id: 1 }] as const;
*
* const primitives = values.filter(isPrimitive);
*
* assert.deepStrictEqual(primitives, [42, 'Ada', null]);
* ```
*
* @param u - The value to check
* @returns `true` if `u` is a primitive type, `false` otherwise. When `true`,
* TypeScript narrows the type to `Primitive`.
*/
export declare const isPrimitive: (u: unknown) => u is Primitive;
//# sourceMappingURL=is-primitive.d.mts.map