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

henrybuilt-js-library

Package Overview
Dependencies
Maintainers
1
Versions
440
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

henrybuilt-js-library - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

README.md

16

package.json
{
"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}`;

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