fix-a-float
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "fix-a-float", | ||
"main": "fix-a-float.js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"homepage": "https://github.com/sakabako/fix-a-float", | ||
@@ -6,0 +6,0 @@ "authors": [ |
@@ -17,3 +17,3 @@ (function(factory) { | ||
if (str.length < 18) { | ||
if (str.length < 17) { | ||
return float; | ||
@@ -20,0 +20,0 @@ } |
{ | ||
"name": "fix-a-float", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Remove precision nightmares from numbers.", | ||
@@ -5,0 +5,0 @@ "main": "fix-a-float.js", |
@@ -5,2 +5,3 @@ var fixAfloat = require('./fix-a-float'); | ||
// length 19, 0s | ||
res = fixAfloat(0.1+0.2); | ||
@@ -12,2 +13,3 @@ if (res !== 0.3) { | ||
// length 18, 9s | ||
res = fixAfloat(0.7+1.4); | ||
@@ -19,2 +21,9 @@ if (res !== 2.1) { | ||
// length 17, 9s | ||
res = fixAfloat(9.1+0.7); | ||
if (res !== 9.8) { | ||
console.log('Failed. 9.1+0.7 = '+res); | ||
process.exit(1); | ||
} | ||
console.log('passed'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2782
75