verb
Version:
Verb makes it easy to build project documentation using simple markdown templates, with zero configuration required.
30 lines (25 loc) • 627 B
JavaScript
/**
* Verb <https://github.com/assemble/verb>
* Generate markdown documentation for GitHub projects.
*
* Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.
* Licensed under the MIT license.
*/
;
// Local libs
var _ = require('lodash');
module.exports = function(verb) {
exports.getAuthors = function(prop) {
var authors = verb.context.authors || [];
authors = _.flatten(authors);
if(prop) {
authors = _.pluck(authors, prop);
} else {
authors = authors;
}
verb.context.authors = authors;
return authors;
};
_.mixin(exports);
return exports;
};