numeric-quantity
Advanced tools
Comparing version 0.2.0 to 0.3.0
{ | ||
"name": "numeric-quantity", | ||
"main": "index.js", | ||
"version": "0.1.2", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/jakeboone02/numeric-quantity", | ||
@@ -6,0 +6,0 @@ "authors": [ |
15
index.js
@@ -1,3 +0,13 @@ | ||
module.exports = function(qty) { | ||
(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.numericQuantity = factory(); | ||
} | ||
}(this, function() { | ||
var numericQuantity = function(qty) { | ||
var badResult = -1; | ||
@@ -125,1 +135,4 @@ var finalResult = badResult; | ||
}; | ||
return numericQuantity; | ||
})); |
{ | ||
"name": "numeric-quantity", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Convert integer plus fraction into a decimal value", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,4 @@ /** | ||
var nq = require("./"); | ||
var nq = this.numericQuantity !== undefined ? this.numericQuantity : require("./"); | ||
var testCount = 0; | ||
@@ -98,2 +99,4 @@ var passCount = 0; | ||
process.exit(testCount - passCount ? 1 : 0); | ||
if (typeof process !== "undefined") { | ||
process.exit(testCount - passCount ? 1 : 0); | ||
} |
10055
7
227