Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fix-a-float

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fix-a-float - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

bower.json
{
"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');
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc