EverydayFun
EverydayFun copied to clipboard
Added searchability to Jokes and Quotes
Added ability to search by Author/Category in Quotes/Jokes
Allows either object or string of search criteria
Examples:
getRandomJoke(['Military', 'Men'])
getRandomJoke('Military')
Also updated README.md with new feature
Nice initiative, but what I don't get is where even is the search initiated from ??
There is no search bar. Maybe add that as well?
Using the function, Uses the function in index.js
You just pass a value if you want to search
Using the function, Uses the function in index.js
You just pass a value if you want to search
@NinjaLabs-Dev Very nice idea, but what i think is that there may be very less probablity that there is a quote available with the requested author name (similar for the category of jokes). Most of the times, our users will get empty values. We wouldn't want that.
Using the function, Uses the function in index.js You just pass a value if you want to search
@NinjaLabs-Dev Very nice idea, but what i think is that there may be very less probablity that there is a quote available with the requested author name (similar for the category of jokes). Most of the times, our users will get empty values. We wouldn't want that.
Ah ok, what would you suggest or just a nice idea that won't work?
Possibly add a return if empty something like:
{ "error": true, "message": "Oh No! We couldn't find any. }
Any update on this?