UNPKG

popular-package

Version:

> Get the popularity stats of packages in a mono repository either internally or on npm for [bolt](https://github.com/boltpkg/bolt) or [lerna](https://github.com/lerna/lerna).

14 lines (11 loc) 288 B
// @flow 'use strict'; const Table = require('cli-table'); function table({ columns, rows } /*: {columns: Array<string>, rows: Array<mixed>} */) /*: string */ { let table = new Table({ head: columns }); table.push(...rows); return table.toString(); } module.exports = { table }