ddgbangs
v0.1.0
Published
All DuckDuckGo !bangs, available as a JS library
Downloads
2
Readme
ddgbangs
npm i ddgbangs
Provides CJS, ESM, and JSON.
import bangs, { hasBang, search } from 'ddgbangs'
console.log(hasBang('kendrick'))
// false
console.log(hasBang('kendrick !yt'))
// Bang {
// category: 'Multimedia',
// subcategory: 'Video',
// bang: 'yt',
// site: 'YouTube',
// url: 'https://www.youtube.com/results?search_query={{{s}}}',
// domain: 'www.youtube.com',
// rating: 452050
// }
console.log(search('kendrick !yt'))
// https://www.youtube.com/results?search_query=kendrick
console.log(bangs)
// Map(13567) {
// ...
// }
License
MIT, code is (c) hazycora. The duckduckgo bangs themselves aren't mine, of course!