Detect if code is running as an npm script but not a yarn script.
Note: Use with >= yarn@1
requires >= is-npm-not-yarn@2
.
var isNpmNotYarn = require('is-npm-not-yarn')
console.log(isNpmNotYarn) // true or false
is-npm-not-yarn
exit code of 0
if is npm and not yarn, else 1