# p-mdlinks

> MarkDown's Library

Latest version **3.0.0** (published 2020-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install p-mdlinks
pnpm add p-mdlinks
yarn add p-mdlinks
bun add p-mdlinks
```

Provides the command `p-mdlinks`.

## 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 | 3.0.0 |
| Published | 2020-05-19 |
| First published | 2020-05-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 15.9 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | YP |
| Maintainers | palomania |
| Keywords | npm, nodeJS, md-links |

## Links

- npm: https://www.npmjs.com/package/p-mdlinks
- Repository: https://github.com/yeniferpaloma3773/p-mdlinks
- Homepage: https://yeniferpaloma3773.github.io/p-mdlinks/
- Issues: https://github.com/yeniferpaloma3773/p-mdlinks/issues/new
- npm.io page: https://npm.io/package/p-mdlinks

## Dependencies (13)

- [axios](https://npm.io/package/axios.md) ^0.19.2
- [chalk](https://npm.io/package/chalk.md) ^4.0.0
- [eslint](https://npm.io/package/eslint.md) ^6.8.0
- [onchange](https://npm.io/package/onchange.md) ^6.1.1
- [prettier](https://npm.io/package/prettier.md) ^2.0.5
- [commander](https://npm.io/package/commander.md) ^5.1.0
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^11.1.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.20.2
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) ^4.2.1
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^6.11.0
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) ^14.1.1
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^3.1.3
- [eslint-plugin-standard](https://npm.io/package/eslint-plugin-standard.md) ^4.0.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2020-05-19

## README

[![Node version](https://img.shields.io/badge/node-v13.1.0-green)](https://nodejs.org/es/) ![Coverage Status](https://img.shields.io/badge/coverage-100%25-magenta) ![npm dependents](https://img.shields.io/badge/dependencies-4-pink)

<p align="center">
  <img src="https://storage.googleapis.com/md-links/titleRMC.png">
</p>
<p align="center">
  <img src="https://storage.googleapis.com/md-links/pMD.png">
</p>
<p align="center">
  <img src="https://storage.googleapis.com/md-links/fcFinal%20(3).png">
</p>

---

[![npm](https://img.shields.io/npm/v/p-mdlinks?color=rgb%28241%2C%2082%2C%200%29&label=Click%20to%20install&logo=npm&logoColor=rgb%28241%2C%2082%2C%200%29&style=plastic)](https://www.npmjs.com/package/p-mdlinks) [![Github developer](https://img.shields.io/twitter/url?color=rgb%28114%2C%20248%2C%2097%29&label=Paloma&logo=github&logoColor=rgb%28114%2C%20248%2C%2097%29&style=plastic&url=https%3A%2F%2Fgithub.com%2Fyeniferpaloma3773%3Ftab%3Drepositories)](https://github.com/yeniferpaloma3773?tab=repositories)
[![Yutube DEMOS](https://img.shields.io/twitter/url?color=rgb%28255%2C%200%2C%200%29&label=Demos&logo=youtube&logoColor=rgb%28255%2C%200%2C%200%29&style=plastic&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DwRivvzrZXic)](https://www.youtube.com/watch?v=wRivvzrZXic)

## CLI (Command Line Interface) 📦

[![Watch the video](https://storage.googleapis.com/md-links/video11.png)](https://youtu.be/kNADJomsQ3o)

- **Install the _CLI_ locally or globally:**

```bash
$ npm install -g yeniferpaloma3773/p-mdlinks

$ npm install @palomania/mdlinks

$ npm install p-mdlinks

$ npm install -g p-mdlinks
```

- **Now, get _markdowns links_ with this command:**

```bash
$ npx p-mdlinks <path-to-file> [options]
```

_For example:_

```bash
$ npx p-mdlinks ./some/example.md

./some/example.md http://ubu.com/2/3/ Link to something
./some/example.md https://deco.net/algun-doc.html some file
./some/example.md http://google.com/ Google
```

## OPTIONS 🔨

##### `-v | --validate`

- **Pass _validate_ option to check & validate all markdown's link(s):**

```bash
$ npx p-mdlinks ./some/example.md -v
$ npx p-mdlinks ./some/example.md --validate

./some/example.md http://ubu.com/2/3/ ok 200 Link to something
./some/example.md https://deco.net/algun-doc.html fail 404 some file
./some/example.md http://google.com/ ok 301 Google
```

##### `-s | --stats`

- **Pass _stats_ option to get the total & unique(s) of markdown's link(s):**

```bash
$ npx p-mdlinks ./some/ -s
$ npx p-mdlinks ./some/example.md --stats

Total: 3
Unique: 3
```

##### `-v -s | --validate --stats`

- **You can pass _both_ options for totals & link's status:**

```bash
$ npx p-mdlinks some -v -s
$ npx p-mdlinks some/example.md --validate --stats

Total: 3
Unique: 3
Broken: 1

```

---

## JavaScript API 💻

[![Watch the video](https://storage.googleapis.com/md-links/video22.png)](https://youtu.be/wRivvzrZXic)

### 🔗 Documentation

- **_Import_ or _require_ 'p-mdlinks' to handle markdown link(s) as objects, validate & stats them also**

```javascript
// ES6
import mdLinks from 'p-mdlinks';
// CommonJS
const mdLinks = require('p-mdlinks');

mdLinks('src')
  .then((res) => console.log('dir without validate: ', res))
  .catch(console.log);
mdLinks('./src', { validate: true })
  .then((res) => console.log('dir with validate: ', res))
  .catch(console.log);
mdLinks('README.md')
  .then((res) => console.log('file without validate: ', res))
  .catch(console.log);
mdLinks('./README.md', { validate: true })
  .then((res) => console.log('file with validate: ', res))
  .catch(console.log);
mdLinks('assets')
  .then((res) => console.log('dir not exist: ', res))
  .catch(console.log);
mdLinks('index.js')
  .then((res) => console.log('md not correct: ', res))
  .catch(console.log);
mdLinks('reading.md')
  .then((res) => console.log('md file not exist: ', res))
  .catch(console.log);
```

<p align="center">
  <img src="https://media.giphy.com/media/gkKXRebzbN9iBx06nx/giphy.gif">
</p>

---

### 🔗 Dependencies

> Technologies used to create this project.

- [x] [Git](https://github.com/yeniferpaloma3773?tab=repositories)
- [x] [Npm](https://docs.npmjs.com/cli-documentation/)
- [x] [Node.js](https://nodejs.org/es/)
- [x] [Javascript](https://developer.mozilla.org/es/docs/Web/JavaScript)

---

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