[READ-ONLY] Mirror of https://github.com/Schniz/wtf.
0

Configure Feed

Select the types of activity you want to include in your feed.

JavaScript 91.4%
HTML 7.5%
Other 1.1%
33 1 6

Clone this repository

https://tangled.org/schlez.in/wtf https://tangled.org/did:plc:6kk265v4thnfbstq7u6vz7qa
git@tangled.org:schlez.in/wtf git@tangled.org:did:plc:6kk265v4thnfbstq7u6vz7qa

For self-hosted knots, clone URLs may differ based on your setup.



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