fix(tools): helper utils (#39603)

This commit is contained in:
Oliver Eyton-Williams
2020-09-17 14:52:55 +02:00
committed by GitHub
parent 3c223c2c7a
commit aecbc28798
2 changed files with 3 additions and 8 deletions

View File

@ -5,12 +5,7 @@ const ObjectID = require('bson-objectid');
const padWithLeadingZeros = originalNum => {
/* always want file step numbers 3 digits */
const maxDigits = 3;
let paddedNum = '' + originalNum;
while (paddedNum.length < maxDigits) {
paddedNum = '0' + paddedNum;
}
return paddedNum;
return ('' + originalNum).padStart(3, '0');
};
const removeErms = seedCode => {