is-cli
Returns true
if the current module was ran directly by node
and not imported by another module. This is useful for CLI-style modules that also export values.
Usage
npm i is-cli
const isCLI = module;// => true
Will throw when module
is absent.
© silverwind, distributed under BSD licence