cerebro-tools
Library package for Cerebro app plugin developers, that includes most used functions
Documentation
Memoize
const memoize = ; const fetchResults =
Use memoize
function from cerebro-tools
for your long-running functions, like API-requests.
Under the hood it just uses memoizee. Check their documentation for more details.
Search
const search = ; // Filter your results arrayconst results = ; // Display filtered results;
Simple function to search in your collection:
search = (items, term, toString = (item) => item) => {}
Where
items
– your array;term
– search term;toString
– function to convert your collection item to string.
Related
License
MIT © Alexandr Subbotin