This package has been deprecated

Author message:

Please use es-main module or similar

is-cli

2.0.0 • Public • Published

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 = require("is-cli")(module);
// => true

Will throw when module is absent.

© silverwind, distributed under BSD licence

Readme

Keywords

Package Sidebar

Install

npm i is-cli

Weekly Downloads

71

Version

2.0.0

License

BSD-2-Clause

Unpacked Size

2.64 kB

Total Files

4

Last publish

Collaborators

  • silverwind