Skip to content

Instantly share code, notes, and snippets.

@Mossuru777
Created December 16, 2019 08:06
Show Gist options
  • Save Mossuru777/478341e7a87a300eb4503ba17b1762e6 to your computer and use it in GitHub Desktop.
Save Mossuru777/478341e7a87a300eb4503ba17b1762e6 to your computer and use it in GitHub Desktop.
const zeroPadding = (number, digits) => (Array(digits).fill("0").join("") + number.valueOf()).substr(-digits);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment