UNPKG

node-tidy

Version:

A CLI tool to find and remove unused NPM packages and Install Missing packages in your Node.js projects.

12 lines (11 loc) 303 B
import { execSync } from "child_process"; function execCommand(command) { try { return execSync(command, { encoding: "utf8" }).trim(); } catch (err) { console.error(`Error executing command: ${command}`, err.message); return null; } } export default execCommand;