This commit is contained in:
root committed 2023-07-30 22:05:51 +02:00
1 parent 65a0be1350
commit 06acaecee1
12267 files changed
+671638 -15

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
export default function addLeadingZeros(number, targetLength) {
var sign = number < 0 ? '-' : '';
var output = Math.abs(number).toString();
while (output.length < targetLength) {
output = '0' + output;
}
return sign + output;
}