asciidoc-xref-extractor

1.0.0 • Public • Published

asciidoc-xref-extractor

Extracts all unique xrefs from asciidoc files.

Installation

npm install --save asciidoc-xref-extractor

API

asciidocXrefExtractor(asciidocFile)

Parameters:

  • asciidocFile is a string in asciidoc format.

Returns:

  • an array containing all unique xrefs from the file.

Example Usage

"use strict";

var fs = require('fs');
var asciidocXrefExtractor = require(asciidoc-xref-extractor);

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

var xrefs = asciidocXrefExtractor(asciidocFile);

xrefs.forEach(function (xref) {
    console.log(xref);
});

Package Sidebar

Install

npm i asciidoc-xref-extractor

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.91 kB

Total Files

4

Last publish

Collaborators

  • gaurav-nelson