# wikipedia-hyperlinks

> Give me a term and I'll give you a list of links found in its Wikipedia article

Latest version **1.0.1** (published 2017-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install wikipedia-hyperlinks
pnpm add wikipedia-hyperlinks
yarn add wikipedia-hyperlinks
bun add wikipedia-hyperlinks
```

Provides the commands `wh`, `wikipedia-hyperlinks`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-11-30 |
| First published | 2017-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | zeke |

## Links

- npm: https://www.npmjs.com/package/wikipedia-hyperlinks
- npm.io page: https://npm.io/package/wikipedia-hyperlinks

## Dependencies (5)

- [got](https://npm.io/package/got.md) ^8.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [urldecode](https://npm.io/package/urldecode.md) ^1.0.1

## Recent versions

- 1.0.1 (latest) — 2017-11-30
- 1.0.0 — 2017-11-30

## README

# wikipedia-hyperlinks 

Give me a term and I'll give you a list of links found in its Wikipedia article

## Installation

This module requires Node.js 8 or higher, because it uses async functions.

Install as a module for programmatic use in your JavaScript code:

```sh
npm i wikipedia-hyperlinks --save
```

Or install as a command-line tool:

```sh
npm i -g wikipedia-hyperlinks
```

## Module Usage

The module exports a single async function which expects a search string:

```js
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.

## CLI Usage

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:

```sh
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
```

## Tests

```sh
npm install
npm test
```

## Dependencies

- [cheerio](https://github.com/cheeriojs/cheerio): Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
- [got](): Simplified HTTP requests
- [lodash](): Lodash modular utilities.
- [minimist](https://github.com/substack/minimist): parse argument options
- [urldecode](https://github.com/zhiyelee/urldecode): Decode url

## Dev Dependencies

- [chai](https://github.com/chaijs/chai): BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- [mocha](https://github.com/mochajs/mocha): simple, flexible, fun test framework
- [nixt](https://github.com/vesln/nixt): Simple and powerful testing for command-line apps
- [standard](https://github.com/standard/standard): JavaScript Standard Style
- [standard-markdown](): Test your Markdown files for Standard JavaScript Style™


## License

MIT

---
_Source: https://npm.io/package/wikipedia-hyperlinks · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
