@ethersproject/units
Advanced tools
Comparing version 5.0.0-beta.130 to 5.0.0-beta.131
@@ -1,1 +0,1 @@ | ||
export declare const version = "units/5.0.0-beta.130"; | ||
export declare const version = "units/5.0.0-beta.131"; |
@@ -1,1 +0,1 @@ | ||
export const version = "units/5.0.0-beta.130"; | ||
export const version = "units/5.0.0-beta.131"; |
@@ -18,3 +18,3 @@ "use strict"; | ||
export function commify(value) { | ||
let comps = String(value).split("."); | ||
const comps = String(value).split("."); | ||
if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || (comps[1] && !comps[1].match(/^[0-9]*$/)) || value === "." || value === "-.") { | ||
@@ -41,3 +41,3 @@ logger.throwArgumentError("invalid value", "value", value); | ||
} | ||
let formatted = []; | ||
const formatted = []; | ||
while (whole.length) { | ||
@@ -49,3 +49,3 @@ if (whole.length <= 3) { | ||
else { | ||
let index = whole.length - 3; | ||
const index = whole.length - 3; | ||
formatted.unshift(whole.substring(index)); | ||
@@ -59,3 +59,3 @@ whole = whole.substring(0, index); | ||
if (typeof (unitName) === "string") { | ||
let index = names.indexOf(unitName); | ||
const index = names.indexOf(unitName); | ||
if (index !== -1) { | ||
@@ -69,3 +69,3 @@ unitName = 3 * index; | ||
if (typeof (unitName) === "string") { | ||
let index = names.indexOf(unitName); | ||
const index = names.indexOf(unitName); | ||
if (index !== -1) { | ||
@@ -72,0 +72,0 @@ unitName = 3 * index; |
@@ -1,1 +0,1 @@ | ||
export declare const version = "units/5.0.0-beta.130"; | ||
export declare const version = "units/5.0.0-beta.131"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = "units/5.0.0-beta.130"; | ||
exports.version = "units/5.0.0-beta.131"; |
{ | ||
"name": "@ethersproject/units", | ||
"version": "5.0.0-beta.130", | ||
"version": "5.0.0-beta.131", | ||
"description": "Unit conversion functions for Ethereum.", | ||
@@ -32,3 +32,3 @@ "main": "./lib/index.js", | ||
"ethereum": "donations.ethers.eth", | ||
"tarballHash": "0x610cf4a90cce266704c5eb97f48d656cf6cf3e09ef89df53e800e1a0e38106c2" | ||
"tarballHash": "0x1021d789790a06156cb1c435eddd8ede86ed98e07cc05c0e75ad3464d09d2b9e" | ||
} |
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
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
8204