duck-it
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

duck-it

A duck duck go client for javascript/typescript

Examples

async function get() {
  const result = await duckIt('bart simpsons');
  console.log(result.data.AbstractText);
}
  • duckIt uses axios as peer dependencies and return an AxiosResponse:
const result = await duckIt('bart simpsons');
  • duckIt can be called with an options object, eahc item is optional:
    • appName: an application name, default duck-it
    • format: received format data, possible values: 'json' or 'xml', default 'json'
    • parentalFilter: parental filter activated or not, possible values 'Activated', 'Moderate' and 'Deactivated', default: 'Activated'
    • noRedirect: boolean, true to skip HTTP redirects
    • noHtml: boolean, true to remove HTML from text
    • skipDisambig: boolean, true to skip disambiguation (for information about this options see Duck Duck GO API documentation

Package Sidebar

Install

npm i duck-it

Weekly Downloads

1

Version

1.0.10

License

MIT

Unpacked Size

12.3 kB

Total Files

19

Last publish

Collaborators

  • franckldx