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

format-quantity

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

format-quantity - npm Package Compare versions

Comparing version 0.1.0 to 0.3.0

bower.json

21

index.js

@@ -1,6 +0,16 @@

function closeEnough (a, b) {
(function (global, factory) {
if (typeof exports === "object" && typeof module !== "undefined" && module.exports) {
module.exports = factory();
} else if (typeof define === "function" && define.amd) {
define(factory);
} else {
global.formatQuantity = factory();
}
}(this, function() {
var closeEnough = function(a, b) {
return Math.abs(a - b) < 0.009;
}
};
module.exports = function(sInQty) {
var formatQuantity = function(sInQty) {

@@ -76,2 +86,5 @@ sQty = sInQty;

return sQty + "";
}
};
return formatQuantity;
}));

2

package.json
{
"name": "format-quantity",
"version": "0.1.0",
"version": "0.3.0",
"description": "Format a number as an integer plus fraction, as seen in recipe ingredient lists",

@@ -5,0 +5,0 @@ "repository": {

@@ -0,0 +0,0 @@ # format-quantity

@@ -5,3 +5,4 @@ /**

var fq = require("./");
var fq = this.formatQuantity !== undefined ? this.formatQuantity : require("./");
var testCount = 0;

@@ -12,3 +13,3 @@ var passCount = 0;

this.attempt = attempt;
};
}

@@ -23,3 +24,3 @@ Tester.prototype.is = function(test) {

console.log(!!passes ? "pass" : "FAIL: '" + this.attempt + "' is not '" + test + "'");
}
};

@@ -70,2 +71,4 @@ function assert(attempt) {

process.exit(testCount - passCount ? 1 : 0);
if (typeof process !== "undefined") {
process.exit(testCount - passCount ? 1 : 0);
}

Sorry, the diff of this file is not supported yet

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