UNPKG

util-ex

Version:

Browser-friendly enhanced util fully compatible with standard node.js

14 lines (13 loc) 427 B
/** * Checks if a given string represents an integer number. * @param {string} str - The string to check. * @returns {boolean} Whether or not the string represents an integer. * @example * isIntStr('42'); // true * isIntStr('0'); // true * isIntStr('-123'); // true * isIntStr('12.3'); // false * isIntStr('1e3'); // false */ export function isIntStr(str: string): boolean; export default isIntStr;