UNPKG

verb

Version:

A project without documentation is like a project that doesn't exist. Verb solves this by making it dead simple to generate docs, using simple markdown templates, with zero configuration required.

13 lines (9 loc) 309 B
const path = require('path'); const _ = require('lodash'); module.exports = function (arr, patterns, options) { options = _.extend({ext: '.md'}, options || {}); return arr.filter(function (filepath) { var basename = path.basename(filepath); return basename === patterns + options.ext; }); };