We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41dd436 commit 984d329Copy full SHA for 984d329
src/errors.js
@@ -34,7 +34,7 @@ const flatten = function(arr) {
34
return arr.reduce((a, b) => a.concat(b), []);
35
};
36
37
-const mapErrors = function(errors) {
+const toIntlErrors = function(errors) {
38
const predicate = function(prev, name) {
39
prev[name] = new IntlError({ name, message: errors[name] });
40
return prev;
@@ -43,10 +43,10 @@ const mapErrors = function(errors) {
43
return Object.keys(errors).reduce(predicate, {});
44
45
46
-const errors = mapErrors(errorDetails);
+const errors = toIntlErrors(errorDetails);
47
48
export {
49
errors,
50
- mapErrors,
51
- IntlError
+ IntlError,
+ toIntlErrors
52
0 commit comments