henrybuilt-js-library
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "henrybuilt-js-library", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"build": "webpack", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha \"./src/**/*test.js\"" | ||
}, | ||
@@ -17,6 +17,14 @@ "author": "", | ||
"babel-loader": "^8.0.2", | ||
"chai": "^4.2.0", | ||
"mocha": "^5.2.0", | ||
"webpack": "^4.19.1", | ||
"webpack-cli": "^3.1.1", | ||
"lodash": "^4.17.11" | ||
"webpack-cli": "^3.1.1" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.17.11", | ||
"module-alias": "^2.1.0" | ||
}, | ||
"_moduleAliases": { | ||
"@src": "src" | ||
} | ||
} |
@@ -0,1 +1,3 @@ | ||
require('module-alias/register'); | ||
var lib = require('./lib'); | ||
@@ -2,0 +4,0 @@ |
@@ -5,3 +5,3 @@ var _ = require('lodash'); | ||
lib = { | ||
module.exports = lib = { | ||
clone(value) { | ||
@@ -146,3 +146,1 @@ var libObject = require('./object'); | ||
}; | ||
module.exports = lib; |
@@ -74,6 +74,7 @@ var _ = require('lodash'); | ||
toPrice(number, n, x) { | ||
toPrice(number, {precision=0} = {}) { | ||
var negative = number < 0; | ||
var expression = `\\d(?=(\\d{${x || 3}'})+${n > 0 ? '\\.' : '$'})`; | ||
var normalNumberString = Math.abs(number).toFixed(Math.max(0, ~~n)).replace(new RegExp(expression, 'g'), '$&,'); | ||
var normalNumberString = Math.abs(number).toFixed(precision).replace(/./g, (c, i, a) => { | ||
return i > 0 && c !== "." && (a.length - i) % 3 === 0 ? `,${c}` : c; | ||
}); | ||
@@ -80,0 +81,0 @@ return `${negative ? '-' : ''}$${normalNumberString}`; |
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
196907
21
1284
1
1
29
0
2
7
3
+ Addedlodash@^4.17.11
+ Addedmodule-alias@^2.1.0
+ Addedlodash@4.17.21(transitive)
+ Addedmodule-alias@2.2.3(transitive)