Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdown-link-extractor

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-link-extractor

extracts links from markdown texts

  • 4.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
79K
increased by6.19%
Maintainers
1
Weekly downloads
 
Created
Source

Extracts links from markdown texts.

Installation

$ npm install --save markdown-link-extractor

API

markdownLinkExtractor(markdown)

Parameters:

  • markdown text in markdown format.

Returns:

  • an array containing the URLs from the links found.

Examples

const { readFileSync } = require('fs');
const markdownLinkExtractor = require('markdown-link-extractor');

const markdown = readFileSync('README.md', {encoding: 'utf8'});

const links = markdownLinkExtractor(markdown);
links.forEach(link => console.log(link));

Upgrading to v4.0.0

  • anchor link extraction no longer supported

Code that looked like this:

const { links } = markdownLinkExtractor(str);

Should change to this:

const links = markdownLinkExtractor(str);

Upgrading to v3.0.0

  • extended mode no longer supported
  • embedded image size parameters in ![]() no longer supported

Testing

npm test

License

See LICENSE.md

Keywords

FAQs

Package last updated on 10 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc