All Downloads are FREE. Search and download functionalities are using the official Maven repository.

polyfills.Number.parseFloat.meta.json Maven / Gradle / Ivy

The newest version!
{"aliases":["es6"],"browsers":{"ie":"<12","ie_mob":"*","firefox":"<25","firefox_mob":"<25","chrome":"<34","android":"<51","safari":"<9","ios_saf":"<9","opera":"<21","op_mini":"*","op_mob":"<21","bb":"*"},"license":"MIT","spec":"http://www.ecma-international.org/ecma-262/6.0/#sec-parsefloat-string","docs":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat","detectSource":"'parseFloat' in Number","testSource":"","baseDir":"Number/parseFloat","hasTests":true,"testsSource":"/* eslint-env mocha, browser*/\n/* global proclaim, it */\n\nit('has correct instance', function () {\n\tproclaim.isInstanceOf(Number.parseFloat, Function);\n});\n\nit('has correct argument length', function () {\n\tproclaim.equal(Number.parseFloat.length, 1);\n});\n\nit('returns NaN with NaN values', function () {\n\tproclaim.equal(Number.parseFloat('Hello').toString(), NaN.toString());\n\tproclaim.equal(Number.parseFloat('H546').toString(), NaN.toString());\n});\n\nit('returns 15 for valid numbers and non-number data types', function () {\n\tproclaim.equal(Number.parseFloat(15.45), 15.45);\n  proclaim.equal(Number.parseFloat(\"15\"), 15);\n  proclaim.equal(Number.parseFloat(\"150e-1\"), 15);\n  proclaim.equal(Number.parseFloat(\"0.150e+2\"), 15);\n  proclaim.equal(Number.parseFloat(\"15.1px\"), 15.1);\n  proclaim.equal(Number.parseFloat(\"15.2\"), 15.2);\n});"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy