// package
is-npm
type: "module"
// preferences
// replacements (1)
snippet::is-npm
Simple or drop-in replacementThis package is no longer necessary. If the current environment is npm the `npm_config_user_agent` environment variable will be set and start with `"npm"`.
// example
const isNpm =
process.env.npm_config_user_agent?.startsWith(
'npm',
);