getPadLength.js 192 B

123456789
  1. module.exports = function getPadLength (obj) {
  2. let longest = 10
  3. for (const name in obj) {
  4. if (name.length + 1 > longest) {
  5. longest = name.length + 1
  6. }
  7. }
  8. return longest
  9. }