source: trip-planner-front/node_modules/core-js/internals/number-parse-float.js@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 612 bytes
Line 
1var global = require('../internals/global');
2var toString = require('../internals/to-string');
3var trim = require('../internals/string-trim').trim;
4var whitespaces = require('../internals/whitespaces');
5
6var $parseFloat = global.parseFloat;
7var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
8
9// `parseFloat` method
10// https://tc39.es/ecma262/#sec-parsefloat-string
11module.exports = FORCED ? function parseFloat(string) {
12 var trimmedString = trim(toString(string));
13 var result = $parseFloat(trimmedString);
14 return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
15} : $parseFloat;
Note: See TracBrowser for help on using the repository browser.