Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Schniz/wtf.
Something went wrong. Try again.
Files
- JavaScript 100%
README.md
wtf
Find out what the function you need
Install #
npm install wtf
Usage #
Sync search #
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)
Web worker #
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)
Shortcut #
Prints results to the console.
const lodash = require('lodash')
const wtf = require('wtf')
wtf({ lodash },
['apple', 'p'], true,
['apple', 'x'], false
)
License #
MIT © Vladimir Danchenkov