md-links-library
Extract Links from Markdown
Last updated 2 years ago by deisetrianon .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install md-links-library 
SYNC missed versions from official npm registry.

Markdown Links Library v.1.0.7

Markdown Links Library is a JavaScript Library that can be used to extract links from Markdown texts.

Version 1.0.7

Returns an array of objects that contains the urls and the links.

Method

getLinksFromMd(markdown);

Usage

Installation

$npm install md-links-library

Examples

$node
> let extract = require("md-links-library")
> extract("[foo](http://foo.com/foo)"); 

// [ { href: 'http://foo.com/foo', text: 'foo' } ]
$node
> let extract = require("md-links-library")
> extract("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut [labore](https://en.wiktionary.org/wiki/labore) et [dolore](https://en.wiktionary.org/wiki/dolore) et [foo](http://foo.com) magna aliqua."); 

// [ 
//   { href: 'https://en.wiktionary.org/wiki/labore', text: 'labore' },
//   { href: 'https://en.wiktionary.org/wiki/dolore', text: 'dolore' }, 
//   { href: 'http://foo.com', text: 'foo' } 
// ]

Current Tags

  • 1.0.7                                ...           latest (2 years ago)

8 Versions

  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 3
Last Month 8
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |