Last active
March 23, 2023 11:26
-
-
Save fobiasmog/5b48e0a750655a6c487fd439e30bb30c to your computer and use it in GitHub Desktop.
Заметки по JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
function getResponseErrors(errors) { | |
function deep(n) { | |
if (typeof(n) === 'object') return flatMapDeep(n, deep); | |
return n; | |
} | |
return flatMapDeep(errors, deep); | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment