[READ-ONLY] Mirror of https://github.com/Schniz/wtf.
Files
README.md

wtf

NPM Version Coverage Status Build Status Downloads Dependency Status License

Find out what the function you need

Install #

npm install wtf

Usage #

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