UNPKG

gulp-reflinks

Version:

Gulp plugin for `reflinks`. Lints a markdown string to find missing reflinks for npm package names, resolves the homepage or repository url from npm, and appends a valid reflink to the document.

16 lines (13 loc) 300 B
'use strict'; const reflinks = require('verb-reflinks'); const through = require('through2'); module.exports = options => { const fn = reflinks(options); return through.obj((file, enc, next) => { if (file.isNull()) { next(null, file); return; } fn(file, next); }); };