UNPKG

verb

Version:

Verb makes it easy to build project documentation using simple markdown templates, with zero configuration required.

27 lines (23 loc) 541 B
/** * 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. */ 'use strict'; /** * Flatten an array and convert it * to a comma-separated list. * * @title listify * @param {Array} arr [description] * @api Public */ module.exports = function (arr, sep) { sep = sep || ', '; do { arr = [].concat.apply([], arr); } while(arr.some(Array.isArray)); return arr.join(sep); };