This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//npm i chalk | |
const util = require('util') | |
const exec = util.promisify(require('child_process').exec) | |
const chalk = require('chalk') | |
async function main() { | |
try { | |
const { stdout } = await exec('npm ls --depth=0 --long --json') | |
const outputJSON = JSON.parse(stdout) |