Library package for Bing app plugin developers, that includes most used functions
modified from cerebro-tools๐, this tools Must be run with bing-tools
change mocha-webpack
to mochapack
npm ls mochapack mocha
const { memoize } = require('bing-tools')
const fetchResults = memoize(() => {
// Your long running function
})
Use memoize
function from bing-tools
for your long-running functions, like API-requests.
Under the hood it just uses memoizee. Check their documentation for more details.
const { search } = require('bing-tools')
// Filter your results array
const results = search(arr, 'something', el => el.key)
// Display filtered results
display(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.
MIT ยฉ Alexandr Subbotin