UNPKG

ivue-material-plus

Version:

A high quality UI components Library with Vue.js

22 lines (18 loc) 637 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const padStart = (string, targetLength, padString) => { targetLength = targetLength >> 0; string = String(string); padString = String(padString); if (string.length > targetLength) { return String(string); } targetLength = targetLength - string.length; if (targetLength > padString.length) { padString += padString.repeat(targetLength / padString.length); } return padString.slice(0, targetLength) + String(string); }; var Pad = (n, length = 2) => padStart(n, length, "0"); exports["default"] = Pad; //# sourceMappingURL=pad.js.map