UNPKG

remeda

Version:

A utility library for JavaScript and Typescript.

22 lines (20 loc) 642 B
import { NarrowedTo } from "./NarrowedTo-DEGJVZVq.cjs"; //#region src/isNumber.d.ts /** * A function that checks if the passed parameter is a number and narrows its * type accordingly. * * @param data - The variable to check. * @returns True if the passed input is a number, false otherwise. * @signature * R.isNumber(data) * @example * R.isNumber(1); // => true * R.isNumber(1n); // => false * R.isNumber('notANumber'); // => false * @category Guard */ declare function isNumber<T>(data: T | number): data is NarrowedTo<T, number>; //#endregion export { isNumber }; //# sourceMappingURL=isNumber-CU2ppJc0.d.cts.map