1.0.3 • Published 4 years ago

asciidoc-link-extractor v1.0.3

Weekly downloads
52
License
MIT
Repository
github
Last release
4 years ago

asciidoc-link-extractor

Extracts hyperlinks from asciidoc files.

Installation

npm install --save asciidoc-link-extractor

API

asciidocLinkExtractor(asciidocFile)

Parameters:

  • asciidocFile is a string in asciidoc format.

Returns:

  • an array containing all hyperlinks from the file.

Example Usage

"use strict";

var fs = require('fs');
var asciidocLinkExtractor = require(asciidoc-links-extractor);

var asciidocFile = fs.readFileSync("./test.adoc").toString();

var links = asciidocLinkExtractor(asciidocFile);

links.forEach(function (link) {
    console.log(link);
});