UNPKG

@topgroup/diginext

Version:

A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.

13 lines (12 loc) 417 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.humanizeNumber = void 0; function humanizeNumber(n, options = {}) { let d = options.delimiter || ","; let s = options.separator || "."; let ns = n.toString().split("."); if (ns[0]) ns[0] = ns[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + d); return ns.join(s); } exports.humanizeNumber = humanizeNumber;