UNPKG

npm-analyze

Version:

CLI tool to analyze the dependencies of your project. Size, count, and overhead in modules

12 lines (10 loc) 310 B
const chalk = require('chalk') const labels = require('./labels.json') module.exports = (result) => { return Object.entries(result).map(([key, value]) => { return [ `\t` + chalk.gray(labels[key]), chalk.yellow(value) ] }).reduce((obj, [key, value]) => { obj[key] = value return obj }, {}) }