118 lines
3.7 KiB
JSON
118 lines
3.7 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "has-flag@^3.0.0",
|
|
"scope": null,
|
|
"escapedName": "has-flag",
|
|
"name": "has-flag",
|
|
"rawSpec": "^3.0.0",
|
|
"spec": ">=3.0.0 <4.0.0",
|
|
"type": "range"
|
|
},
|
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/supports-color"
|
|
]
|
|
],
|
|
"_from": "has-flag@>=3.0.0 <4.0.0",
|
|
"_id": "has-flag@3.0.0",
|
|
"_inCache": true,
|
|
"_location": "/has-flag",
|
|
"_nodeVersion": "4.8.4",
|
|
"_npmOperationalInternal": {
|
|
"host": "s3://npm-registry-packages",
|
|
"tmp": "tmp/has-flag-3.0.0.tgz_1514920915118_0.33958922349847853"
|
|
},
|
|
"_npmUser": {
|
|
"name": "sindresorhus",
|
|
"email": "sindresorhus@gmail.com"
|
|
},
|
|
"_npmVersion": "2.15.11",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "has-flag@^3.0.0",
|
|
"scope": null,
|
|
"escapedName": "has-flag",
|
|
"name": "has-flag",
|
|
"rawSpec": "^3.0.0",
|
|
"spec": ">=3.0.0 <4.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/supports-color"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
|
"_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd",
|
|
"_shrinkwrap": null,
|
|
"_spec": "has-flag@^3.0.0",
|
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/supports-color",
|
|
"author": {
|
|
"name": "Sindre Sorhus",
|
|
"email": "sindresorhus@gmail.com",
|
|
"url": "sindresorhus.com"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/sindresorhus/has-flag/issues"
|
|
},
|
|
"dependencies": {},
|
|
"description": "Check if argv has a specific flag",
|
|
"devDependencies": {
|
|
"ava": "*",
|
|
"xo": "*"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd",
|
|
"tarball": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz"
|
|
},
|
|
"engines": {
|
|
"node": ">=4"
|
|
},
|
|
"files": [
|
|
"index.js"
|
|
],
|
|
"gitHead": "8b2ca7e693b2c742b29f2399194077b64b9ff781",
|
|
"homepage": "https://github.com/sindresorhus/has-flag#readme",
|
|
"keywords": [
|
|
"has",
|
|
"check",
|
|
"detect",
|
|
"contains",
|
|
"find",
|
|
"flag",
|
|
"cli",
|
|
"command-line",
|
|
"argv",
|
|
"process",
|
|
"arg",
|
|
"args",
|
|
"argument",
|
|
"arguments",
|
|
"getopt",
|
|
"minimist",
|
|
"optimist"
|
|
],
|
|
"license": "MIT",
|
|
"maintainers": [
|
|
{
|
|
"name": "sindresorhus",
|
|
"email": "sindresorhus@gmail.com"
|
|
},
|
|
{
|
|
"name": "jbnicolai",
|
|
"email": "jappelman@xebia.com"
|
|
}
|
|
],
|
|
"name": "has-flag",
|
|
"optionalDependencies": {},
|
|
"readme": "# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)\n\n> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag\n\nCorrectly stops looking after an `--` argument terminator.\n\n\n## Install\n\n```\n$ npm install has-flag\n```\n\n\n## Usage\n\n```js\n// foo.js\nconst hasFlag = require('has-flag');\n\nhasFlag('unicorn');\n//=> true\n\nhasFlag('--unicorn');\n//=> true\n\nhasFlag('f');\n//=> true\n\nhasFlag('-f');\n//=> true\n\nhasFlag('foo=bar');\n//=> true\n\nhasFlag('foo');\n//=> false\n\nhasFlag('rainbow');\n//=> false\n```\n\n```\n$ node foo.js -f --unicorn --foo=bar -- --rainbow\n```\n\n\n## API\n\n### hasFlag(flag, [argv])\n\nReturns a boolean for whether the flag exists.\n\n#### flag\n\nType: `string`\n\nCLI flag to look for. The `--` prefix is optional.\n\n#### argv\n\nType: `string[]`<br>\nDefault: `process.argv`\n\nCLI arguments.\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n",
|
|
"readmeFilename": "readme.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/sindresorhus/has-flag.git"
|
|
},
|
|
"scripts": {
|
|
"test": "xo && ava"
|
|
},
|
|
"version": "3.0.0"
|
|
}
|