is-npm-cli

Check if your code is running as an npm script

Browse on unpkg