aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/date-fns/esm/_lib/addLeadingZeros/index.js')
-rw-r--r--node_modules/date-fns/esm/_lib/addLeadingZeros/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js b/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
new file mode 100644
index 0000000..e16dacb
--- /dev/null
+++ b/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js
@@ -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;
+} \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage