UNPKG

@subsocial/utils

Version:
15 lines (14 loc) 355 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseNumStr = exports.isNum = void 0; const isNum = (x) => typeof x === 'number'; exports.isNum = isNum; const parseNumStr = (num) => { try { return parseInt(num); } catch (err) { return undefined; } }; exports.parseNumStr = parseNumStr;