Skip to content

Commit 984d329

Browse files
committed
refactor: rename mapErrors to
1 parent 41dd436 commit 984d329

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/errors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const flatten = function(arr) {
3434
return arr.reduce((a, b) => a.concat(b), []);
3535
};
3636

37-
const mapErrors = function(errors) {
37+
const toIntlErrors = function(errors) {
3838
const predicate = function(prev, name) {
3939
prev[name] = new IntlError({ name, message: errors[name] });
4040
return prev;
@@ -43,10 +43,10 @@ const mapErrors = function(errors) {
4343
return Object.keys(errors).reduce(predicate, {});
4444
};
4545

46-
const errors = mapErrors(errorDetails);
46+
const errors = toIntlErrors(errorDetails);
4747

4848
export {
4949
errors,
50-
mapErrors,
51-
IntlError
50+
IntlError,
51+
toIntlErrors
5252
};

0 commit comments

Comments
 (0)