diff options
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) |