UNPKG

@stacksjs/ts-validation

Version:

A simple TypeScript starter kit using Bun.

7 lines 264 B
/** * Convert a string to an integer. * @param str The string to convert * @param radix The radix to use for conversion (default is 10) * @returns The integer value if valid, NaN otherwise */ export declare function toInt(str: string, radix?: number): number;