@willbooster/shared-lib 5.1.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/humanize.cjs +2 -0
- package/dist/humanize.cjs.map +1 -0
- package/dist/humanize.d.ts +4 -0
- package/dist/humanize.js +2 -0
- package/dist/humanize.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanize.cjs","sources":["../src/humanize.ts"],"sourcesContent":["export function humanizeNumber(value: number, { base = 1000, units = ['K', 'M', 'B', 'T', 'P'] } = {}): string {\n if (value < base) {\n return value.toString();\n }\n\n let unitIndex = -1;\n while (value >= base && unitIndex < units.length - 1) {\n value /= base;\n unitIndex++;\n }\n\n return value.toFixed(2) + (unitIndex >= 0 ? units[unitIndex] : '');\n}\n"],"names":["value","base","units","toString","unitIndex","length","toFixed"],"mappings":"oCAAO,SAAwBA,GAAeC,KAAEA,EAAO,IAAIC,MAAEA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,MAAS,IACjG,GAAIF,EAAQC,EACV,OAAOD,EAAMG,WAGf,IAAIC,GAAa,EACjB,KAAOJ,GAASC,GAAQG,EAAYF,EAAMG,OAAS,GACjDL,GAASC,EACTG,IAGF,OAAOJ,EAAMM,QAAQ,IAAMF,GAAa,EAAIF,EAAME,GAAa,GACjE"}
|
package/dist/humanize.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanize.js","sources":["../src/humanize.ts"],"sourcesContent":["export function humanizeNumber(value: number, { base = 1000, units = ['K', 'M', 'B', 'T', 'P'] } = {}): string {\n if (value < base) {\n return value.toString();\n }\n\n let unitIndex = -1;\n while (value >= base && unitIndex < units.length - 1) {\n value /= base;\n unitIndex++;\n }\n\n return value.toFixed(2) + (unitIndex >= 0 ? units[unitIndex] : '');\n}\n"],"names":["humanizeNumber","value","base","units","toString","unitIndex","length","toFixed"],"mappings":"AAAO,SAASA,EAAeC,GAAeC,KAAEA,EAAO,IAAIC,MAAEA,EAAQ,CAAC,IAAK,IAAK,IAAK,IAAK,MAAS,IACjG,GAAIF,EAAQC,EACV,OAAOD,EAAMG,WAGf,IAAIC,GAAa,EACjB,KAAOJ,GAASC,GAAQG,EAAYF,EAAMG,OAAS,GACjDL,GAASC,EACTG,IAGF,OAAOJ,EAAMM,QAAQ,IAAMF,GAAa,EAAIF,EAAME,GAAa,GACjE"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./error.cjs"),r=require("./mail.cjs"),o=require("./shuffle.cjs"),
|
|
1
|
+
"use strict";var e=require("./error.cjs"),r=require("./humanize.cjs"),s=require("./mail.cjs"),o=require("./shuffle.cjs"),n=require("./sleep.cjs"),i=require("./zenkaku.cjs");exports.errorify=e.errorify,exports.ignoreEnoent=e.ignoreEnoent,exports.ignoreEnoentAsync=e.ignoreEnoentAsync,exports.ignoreError=e.ignoreError,exports.ignoreErrorAsync=e.ignoreErrorAsync,exports.withRetry=e.withRetry,exports.humanizeNumber=r.humanizeNumber,exports.mailTemplates=s.mailTemplates,exports.shuffle=o.shuffle,exports.sleep=n.sleep,exports.zenkakuAlphanumericalsToHankaku=i.zenkakuAlphanumericalsToHankaku;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { errorify, ignoreError, ignoreEnoent, ignoreErrorAsync, ignoreEnoentAsync, withRetry } from './error.js';
|
|
2
|
+
export { humanizeNumber } from './humanize.js';
|
|
2
3
|
export { mailTemplates } from './mail.js';
|
|
3
4
|
export { shuffle } from './shuffle.js';
|
|
4
5
|
export { sleep } from './sleep.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{errorify,ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync,withRetry}from"./error.js";export{mailTemplates}from"./mail.js";export{shuffle}from"./shuffle.js";export{sleep}from"./sleep.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
|
|
1
|
+
export{errorify,ignoreEnoent,ignoreEnoentAsync,ignoreError,ignoreErrorAsync,withRetry}from"./error.js";export{humanizeNumber}from"./humanize.js";export{mailTemplates}from"./mail.js";export{shuffle}from"./shuffle.js";export{sleep}from"./sleep.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/shared-lib",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"author": "WillBooster Inc.",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/eslint": "8.56.10",
|
|
40
40
|
"@types/micromatch": "4.0.7",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
42
|
-
"@typescript-eslint/parser": "7.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "7.10.0",
|
|
42
|
+
"@typescript-eslint/parser": "7.10.0",
|
|
43
43
|
"@willbooster/eslint-config-ts": "10.6.0",
|
|
44
44
|
"@willbooster/prettier-config": "9.1.2",
|
|
45
45
|
"build-ts": "13.1.5",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
52
52
|
"eslint-plugin-unicorn": "53.0.0",
|
|
53
53
|
"lint-staged": "15.2.2",
|
|
54
|
-
"micromatch": "4.0.
|
|
54
|
+
"micromatch": "4.0.6",
|
|
55
55
|
"prettier": "3.2.5",
|
|
56
56
|
"sort-package-json": "2.10.0",
|
|
57
57
|
"typescript": "5.4.5",
|