_parse-float.js 359 B

12345678
  1. var $parseFloat = require('./_global').parseFloat;
  2. var $trim = require('./_string-trim').trim;
  3. module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str) {
  4. var string = $trim(String(str), 3);
  5. var result = $parseFloat(string);
  6. return result === 0 && string.charAt(0) == '-' ? -0 : result;
  7. } : $parseFloat;