securityos/node_modules/core-js/modules/_parse-float.js

9 lines
359 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
var $parseFloat = require('./_global').parseFloat;
var $trim = require('./_string-trim').trim;
module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) {
var string = $trim(String(str), 3);
var result = $parseFloat(string);
return result === 0 && string.charAt(0) == '-' ? -0 : result;
} : $parseFloat;