is-npx
A small utility that checks if the process is running using npx
installation
npm install is-npx
Usage
Running with npx
npx node-module
// node-module/index.js const isNpx = ; console // true
Running without npx
node node-module/index.js
// node-module/index.js const isNpx = ; console // false