UNPKG

emmet.sdk

Version:
17 lines 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.zerroPadding = void 0; function zerroPadding(inputString, decimals, targetLength) { const s = BigInt(inputString).toString(); const d = parseInt(BigInt(decimals).toString()); const L = parseInt(BigInt(targetLength).toString()); if (d > s.length) { const padding = '0'.repeat(d - s.length); return `${padding}${s.slice(0, L)}`; } else { return s; } } exports.zerroPadding = zerroPadding; //# sourceMappingURL=zerroPadding.js.map