diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/has-flag/readme.md | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/has-flag/readme.md')
-rw-r--r-- | node_modules/has-flag/readme.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/node_modules/has-flag/readme.md b/node_modules/has-flag/readme.md index ea5c81793..0caca6cba 100644 --- a/node_modules/has-flag/readme.md +++ b/node_modules/has-flag/readme.md @@ -16,7 +16,7 @@ $ npm install --save has-flag ```js // foo.js -var hasFlag = require('has-flag'); +const hasFlag = require('has-flag'); hasFlag('unicorn'); //=> true @@ -24,6 +24,9 @@ hasFlag('unicorn'); hasFlag('--unicorn'); //=> true +hasFlag('-f'); +//=> true + hasFlag('foo=bar'); //=> true @@ -35,7 +38,7 @@ hasFlag('rainbow'); ``` ``` -$ node foo.js --unicorn --foo=bar -- --rainbow +$ node foo.js -f --unicorn --foo=bar -- --rainbow ``` @@ -53,7 +56,7 @@ CLI flag to look for. The `--` prefix is optional. #### argv -Type: `array` +Type: `array`<br> Default: `process.argv` CLI arguments. @@ -61,4 +64,4 @@ CLI arguments. ## License -MIT © [Sindre Sorhus](http://sindresorhus.com) +MIT © [Sindre Sorhus](https://sindresorhus.com) |