1 line
No EOL
1.3 KiB
Text
1 line
No EOL
1.3 KiB
Text
{"version":3,"sources":["../../../../src/components/VDatePicker/util/pad.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,CAAC,MAAD,EAA0B,YAA1B,EAAgD,SAAhD,KAAqE;AACpF,EAAA,YAAY,GAAG,YAAY,IAAI,CAA/B;AACA,EAAA,MAAM,GAAG,MAAM,CAAC,MAAD,CAAf;AACA,EAAA,SAAS,GAAG,MAAM,CAAC,SAAD,CAAlB;;AACA,MAAI,MAAM,CAAC,MAAP,GAAgB,YAApB,EAAkC;AAChC,WAAO,MAAM,CAAC,MAAD,CAAb;AACD;;AAED,EAAA,YAAY,GAAG,YAAY,GAAG,MAAM,CAAC,MAArC;;AACA,MAAI,YAAY,GAAG,SAAS,CAAC,MAA7B,EAAqC;AACnC,IAAA,SAAS,IAAI,SAAS,CAAC,MAAV,CAAiB,YAAY,GAAG,SAAS,CAAC,MAA1C,CAAb;AACD;;AACD,SAAO,SAAS,CAAC,KAAV,CAAgB,CAAhB,EAAmB,YAAnB,IAAmC,MAAM,CAAC,MAAD,CAAhD;AACD,CAbD;;AAeA,gBAAe,CAAC,CAAD,EAAqB,MAAM,GAAG,CAA9B,KAAoC,QAAQ,CAAC,CAAD,EAAI,MAAJ,EAAY,GAAZ,CAA3D","sourcesContent":["const padStart = (string: number | string, targetLength: number, padString: string) => {\n targetLength = targetLength >> 0\n string = String(string)\n padString = String(padString)\n if (string.length > targetLength) {\n return String(string)\n }\n\n targetLength = targetLength - string.length\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length)\n }\n return padString.slice(0, targetLength) + String(string)\n}\n\nexport default (n: string | number, length = 2) => padStart(n, length, '0')\n"],"sourceRoot":"","file":"pad.js"} |