Skip to content

Commit

Permalink
refactor: change forEach to for of
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarocastro committed Mar 13, 2021
1 parent 7f86995 commit db83a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -176,11 +176,11 @@ const numeralPrefix = function (number, suffix = '') {
.reverse();

let result = '';
numbers.forEach((n, i) => {
for (const [i, n] of numbers.entries()) {
if (n > 0) {
result = transforms[i](result, numbers, number);
}
});
}

return result + suffix;
};
Expand Down

0 comments on commit db83a9a

Please sign in to comment.