Created
July 3, 2019 16:10
-
-
Save jsmanifest/8b3b423d38f87e8969f9930df8ef4365 to your computer and use it in GitHub Desktop.
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
| const hasInvalidChars = /^.*?(?=[\+\^#%&$\*:<>\?/\{\|\}\[\]\)\(]).*$/g.test( | |
| inputValue, | |
| ) | |
| const callApi = async (keywords) => { | |
| try { | |
| const url = `https://someapi.com/v1/search/?keywords=${keywords}/` | |
| return api.searchStuff(url) | |
| } catch (error) { | |
| throw error | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment