Created
November 29, 2019 09:48
-
-
Save daniilgri/acd3e6694b20f740f1b10da783cb27f4 to your computer and use it in GitHub Desktop.
This file contains 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
case types.SEARCH: | |
const newState = state.filter(el => { | |
for (let prop in el) { | |
return el[prop].includes(action.query); | |
} | |
return false; | |
}); | |
return newState; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment