I am using the babel env
preset which allows me to use es2017
. I have tested the padStart
function on this example:
'a'.padStart(2, '0')
which yields 0a
. Which is correct and means it's working.
However, when I use it on an object it does not work. exp_month.padStart(2, '0')
yields exp_month.padStart is not a function