Skip to content

Instantly share code, notes, and snippets.

View worst-developer's full-sized avatar
🇺🇦
doing magic 🌈

Yaroslav Pidmohylniy worst-developer

🇺🇦
doing magic 🌈
  • Tictrac
  • Lviv, Ukraine
  • 15:18 (UTC +03:00)
View GitHub Profile
const { exec } = require('child_process')
const { promisify } = require('util')
const chalk = require('chalk')
// See: https://docs.npmjs.com/about-audit-reports#severity
const SEVERITY_LEVELS = ['low', 'moderate', 'high', 'critical']
const SEVERITY_THRESHOLD = 'critical'
const run = promisify(exec)
// Get the output of a command. If the command exits with a non-zero code, try