Find out what the function you need
npm install wtf
Synchronous search is simple, fast and the only one supporting preloaded modules. Downside is that if it hangs - your thread will too.
const lodash = require('lodash')
const wtf = require('wtf')
const print = ({ result, display }) => console.log(`${result} ≈ ${display}`)
wtf.sync({ lodash },
['apple', 'p'], true,
['apple', 'x'], false
).map(print)
Not implemented yet
const wtf = require('wtf')
const print = ({ result, display }) => display && console.log(`${result} ≈ ${display}`)
wtf.webWorker('lodash',
['apple', 'p'], true,
['apple', 'x'], false
).map(print)
Prints results to the console.
const lodash = require('lodash')
const wtf = require('wtf')
wtf({ lodash },
['apple', 'p'], true,
['apple', 'x'], false
)
MIT © Vladimir Danchenkov