UNPKG

yini-parser

Version:

Readable configuration without YAML foot-guns or JSON noise. The official Node.js parser for YINI config format — An INI-inspired configuration format with clear nesting, explicit types, and predictable parsing.

19 lines 664 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isValidJSNumber = exports.isInfinityValue = exports.isNaNValue = void 0; const isNaNValue = (n) => { return Number.isNaN(n); }; exports.isNaNValue = isNaNValue; const isInfinityValue = (n) => { return n === Infinity || n === -Infinity; }; exports.isInfinityValue = isInfinityValue; const isValidJSNumber = (str) => { if (str.trim() === '') return false; // Reject empty or whitespace-only. const n = Number(str); return !Number.isNaN(n); // True only if parse succeeded. }; exports.isValidJSNumber = isValidJSNumber; //# sourceMappingURL=number.js.map