New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

reflinks

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reflinks

Generate (relative) reference links for a glob of markdown files, allowing you to more easily create references from one file to another.

Source
npmnpm
Version
0.3.5
Version published
Weekly downloads
337
85.16%
Maintainers
2
Weekly downloads
 
Created
Source

Generate (relative) reference links for a glob of markdown files, allowing you to more easily create references from one file to another.

Install

Install with npm:

$ npm install --save reflinks

HEADS UP!

The API was completely changed in v0.2. The main export is now an async function that expects a callback, and instead of globbing local files, reflinks are created from npm package names.

Usage

var reflinks = require('reflinks');

reflinks(['base', 'verb', 'generate'], function(err, links) {
  if (err) return console.log(err);
  console.log(links);
  // results in:
  // [ '[generate]: https://github.com/generate/generate',
  //   '[verb]: https://github.com/verbose/verb',
  //   '[base]: https://github.com/node-base/base' ]
});

By default results are cached for 7 days. See pkg-cache for more details and API documentation related to caching packages.

Options

cache

Disable caching by setting options.cache to false.

Type: Boolean

Default: undefined

reflinks(['base'], { cache: false }, function(err, links) {
  if (err) return console.log(err);
});

This option is also aliased as reflinksCache.

clearCache

Delete the cache by setting options.clearCache to true.

Type: Boolean

Default: undefined

reflinks(['base'], { clearCache: true }, function(err, links) {
  if (err) return console.log(err);
});

About

  • markdown-utils: Micro-utils for creating markdown snippets. | homepage
  • remarkable: Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… more | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

To generate the readme and API documentation with verb:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb, v0.9.0, on July 18, 2016.

Keywords

link

FAQs

Package last updated on 29 Dec 2016

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