Give me a term and I'll give you a list of links found in its Wikipedia article
This module requires Node.js 8 or higher, because it uses async functions.
Install as a module for programmatic use in your JavaScript code:
npm i wikipedia-hyperlinks --save
Or install as a command-line tool:
npm i -D wikipedia-hyperlinks
The module exports a single async function which expects a search string:
const wh = require('wikipedia-hyperlinks')
wh('Pierre Curie').then(links => {
console.log(links.slice(0, 10))
// Paris
// University of Paris
// Radioactivity
// Curie-Weiss law
// Curie constant
// Curie temperature
// Piezoelectricity
// Marie Skłodowska-Curie
// Irène Joliot-Curie
})
If no match is found, an empty array is returned.
If you install the module globally, you'll have a command called
wikipedia-hyperlinks
on your PATH, and another called wh
for convenience.
Enter a term:
wh Pierre Curie | head
Paris
University of Paris
Radioactivity
Curie-Weiss law
Curie constant
Curie temperature
Piezoelectricity
Marie Skłodowska-Curie
Irène Joliot-Curie
npm install
npm test
- cheerio: Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
- got: Simplified HTTP requests
- lodash: Lodash modular utilities.
- minimist: parse argument options
- urldecode: Decode url
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- mocha: simple, flexible, fun test framework
- nixt: Simple and powerful testing for command-line apps
- standard: JavaScript Standard Style
- standard-markdown: Test your Markdown files for Standard JavaScript Style™
MIT