Sha256: b39ccc9de74e65a90fbad2dd4fd4524a927d8b5ec5b93abd3e72fc4dd1d1a743

Contents?: true

Size: 587 Bytes

Versions: 12

Compression:

Stored size: 587 Bytes

Contents

var global = require('../internals/global');
var trim = require('../internals/string-trim').trim;
var whitespaces = require('../internals/whitespaces');

var nativeParseFloat = global.parseFloat;
var FORCED = 1 / nativeParseFloat(whitespaces + '-0') !== -Infinity;

// `parseFloat` method
// https://tc39.github.io/ecma262/#sec-parsefloat-string
module.exports = FORCED ? function parseFloat(string) {
  var trimmedString = trim(String(string));
  var result = nativeParseFloat(trimmedString);
  return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
} : nativeParseFloat;

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/core-js/internals/parse-float.js
disco_app-0.18.2 test/dummy/node_modules/core-js/internals/parse-float.js
condenser-0.0.8 lib/condenser/processors/node_modules/core-js-pure/internals/parse-float.js
jester-data-8.0.0 node_modules/core-js/internals/parse-float.js
ezii-os-5.2.1 node_modules/core-js/internals/parse-float.js
ezii-os-2.0.1 node_modules/core-js/internals/parse-float.js
ezii-os-1.1.0 node_modules/core-js/internals/parse-float.js
ezii-os-1.0.0 node_modules/core-js/internals/parse-float.js
condenser-0.0.7 lib/condenser/processors/node_modules/core-js-pure/internals/parse-float.js
ezii-os-0.0.0.1.0 node_modules/core-js/internals/parse-float.js
ezii-os-0.0.0.0.1 node_modules/core-js/internals/parse-float.js
condenser-0.0.5 lib/condenser/processors/node_modules/core-js-pure/internals/parse-float.js