Skip to content

Instantly share code, notes, and snippets.

View dmoptimal's full-sized avatar

Daniel Mason dmoptimal

View GitHub Profile
//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)