ChunkSplittingPlugin.js
function leadingZeros(number, minLength = 0, padWith = '0') {
  const stringNumber = number.toString()
  const paddingLength = minLength - stringNumber.length
  return paddingLength > 0 ? `${padWith.repeat(paddingLength)}${stringNumber}` : stringNumber
}
function leadingZeros(number, minLength = 0, padWith = '0') {
  const stringNumber = number.toString()
  const paddingLength = minLength - stringNumber.length
  return paddingLength > 0 ? `${padWith.repeat(paddingLength)}${stringNumber}` : stringNumber
}
function leadingZeros ( number , minLength = 0 , padWith = '0' ) { const stringNumber = number . toString ( ) const paddingLength = minLength - stringNumber . length return paddingLength > 0 ? ` ${ padWith . repeat ( paddingLength ) } ${ stringNumber } ` : stringNumber }
Ensures a number is padded with a certain amount of leading characters
@param {number} number
@param {number} minLength
@param {string} padWith
Ensures a number is padded with a certain amount of leading characters