UNPKG

@adaptabletools/adaptable-cjs

Version:

Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

13 lines (12 loc) 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = parseIntFn; /** * Converts string to an integer of the specified radix. * If radix is undefined or 0, a radix of 10 is used (unlike native parseInt which auto-detects). * Drop-in replacement for lodash/parseInt. */ function parseIntFn(string, radix) { const str = typeof string === 'string' ? string.trim() : String(string); return globalThis.parseInt(str, radix || 10); }