| 1 |
{ |
| 2 |
"_id": "has-flag", |
| 3 |
"_rev": "11-c8b2538e0ea567ee48b2bc44b666ab59", |
| 4 |
"name": "has-flag", |
| 5 |
"description": "Check if argv has a specific flag", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "4.0.0" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"1.0.0": { |
| 11 |
"name": "has-flag", |
| 12 |
"version": "1.0.0", |
| 13 |
"description": "Check if argv has a specific flag", |
| 14 |
"license": "MIT", |
| 15 |
"repository": { |
| 16 |
"type": "git", |
| 17 |
"url": "git+https://github.com/sindresorhus/has-flag.git" |
| 18 |
}, |
| 19 |
"author": { |
| 20 |
"name": "Sindre Sorhus", |
| 21 |
"email": "[email protected]", |
| 22 |
"url": "sindresorhus.com" |
| 23 |
}, |
| 24 |
"maintainers": [ |
| 25 |
{ |
| 26 |
"name": "Sindre Sorhus", |
| 27 |
"email": "[email protected]", |
| 28 |
"url": "sindresorhus.com" |
| 29 |
}, |
| 30 |
{ |
| 31 |
"name": "Joshua Appelman", |
| 32 |
"email": "[email protected]", |
| 33 |
"url": "jbnicolai.com" |
| 34 |
}, |
| 35 |
{ |
| 36 |
"name": "JD Ballard", |
| 37 |
"email": "[email protected]", |
| 38 |
"url": "github.com/qix-" |
| 39 |
} |
| 40 |
], |
| 41 |
"engines": { |
| 42 |
"node": ">=0.10.0" |
| 43 |
}, |
| 44 |
"scripts": { |
| 45 |
"test": "node test.js" |
| 46 |
}, |
| 47 |
"files": [ |
| 48 |
"index.js" |
| 49 |
], |
| 50 |
"keywords": [ |
| 51 |
"has", |
| 52 |
"check", |
| 53 |
"detect", |
| 54 |
"contains", |
| 55 |
"find", |
| 56 |
"flag", |
| 57 |
"cli", |
| 58 |
"command-line", |
| 59 |
"argv", |
| 60 |
"process", |
| 61 |
"arg", |
| 62 |
"args", |
| 63 |
"argument", |
| 64 |
"arguments", |
| 65 |
"getopt", |
| 66 |
"minimist", |
| 67 |
"optimist" |
| 68 |
], |
| 69 |
"devDependencies": { |
| 70 |
"ava": "0.0.4" |
| 71 |
}, |
| 72 |
"gitHead": "621de2782d538f28f99f0bb85b158799cb3ae5cf", |
| 73 |
"bugs": { |
| 74 |
"url": "https://github.com/sindresorhus/has-flag/issues" |
| 75 |
}, |
| 76 |
"homepage": "https://github.com/sindresorhus/has-flag#readme", |
| 77 |
"_id": "[email protected]", |
| 78 |
"_shasum": "9d9e793165ce017a00f00418c43f942a7b1d11fa", |
| 79 |
"_from": ".", |
| 80 |
"_npmVersion": "2.11.2", |
| 81 |
"_nodeVersion": "0.12.5", |
| 82 |
"_npmUser": { |
| 83 |
"name": "sindresorhus", |
| 84 |
"email": "[email protected]" |
| 85 |
}, |
| 86 |
"dist": { |
| 87 |
"shasum": "9d9e793165ce017a00f00418c43f942a7b1d11fa", |
| 88 |
"tarball": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz" |
| 89 |
}, |
| 90 |
"directories": {} |
| 91 |
}, |
| 92 |
"2.0.0": { |
| 93 |
"name": "has-flag", |
| 94 |
"version": "2.0.0", |
| 95 |
"description": "Check if argv has a specific flag", |
| 96 |
"license": "MIT", |
| 97 |
"repository": { |
| 98 |
"type": "git", |
| 99 |
"url": "git+https://github.com/sindresorhus/has-flag.git" |
| 100 |
}, |
| 101 |
"author": { |
| 102 |
"name": "Sindre Sorhus", |
| 103 |
"email": "[email protected]", |
| 104 |
"url": "sindresorhus.com" |
| 105 |
}, |
| 106 |
"maintainers": [ |
| 107 |
{ |
| 108 |
"name": "sindresorhus", |
| 109 |
"email": "[email protected]" |
| 110 |
}, |
| 111 |
{ |
| 112 |
"name": "jbnicolai", |
| 113 |
"email": "[email protected]" |
| 114 |
} |
| 115 |
], |
| 116 |
"engines": { |
| 117 |
"node": ">=0.10.0" |
| 118 |
}, |
| 119 |
"scripts": { |
| 120 |
"test": "xo && ava" |
| 121 |
}, |
| 122 |
"files": [ |
| 123 |
"index.js" |
| 124 |
], |
| 125 |
"keywords": [ |
| 126 |
"has", |
| 127 |
"check", |
| 128 |
"detect", |
| 129 |
"contains", |
| 130 |
"find", |
| 131 |
"flag", |
| 132 |
"cli", |
| 133 |
"command-line", |
| 134 |
"argv", |
| 135 |
"process", |
| 136 |
"arg", |
| 137 |
"args", |
| 138 |
"argument", |
| 139 |
"arguments", |
| 140 |
"getopt", |
| 141 |
"minimist", |
| 142 |
"optimist" |
| 143 |
], |
| 144 |
"devDependencies": { |
| 145 |
"ava": "*", |
| 146 |
"xo": "*" |
| 147 |
}, |
| 148 |
"gitHead": "601137409f2617c75838d8f3febed5c6e6e8ee2c", |
| 149 |
"bugs": { |
| 150 |
"url": "https://github.com/sindresorhus/has-flag/issues" |
| 151 |
}, |
| 152 |
"homepage": "https://github.com/sindresorhus/has-flag#readme", |
| 153 |
"_id": "[email protected]", |
| 154 |
"_shasum": "e8207af1cc7b30d446cc70b734b5e8be18f88d51", |
| 155 |
"_from": ".", |
| 156 |
"_npmVersion": "3.8.6", |
| 157 |
"_nodeVersion": "4.4.2", |
| 158 |
"_npmUser": { |
| 159 |
"name": "sindresorhus", |
| 160 |
"email": "[email protected]" |
| 161 |
}, |
| 162 |
"dist": { |
| 163 |
"shasum": "e8207af1cc7b30d446cc70b734b5e8be18f88d51", |
| 164 |
"tarball": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz" |
| 165 |
}, |
| 166 |
"_npmOperationalInternal": { |
| 167 |
"host": "packages-16-east.internal.npmjs.com", |
| 168 |
"tmp": "tmp/has-flag-2.0.0.tgz_1460389675597_0.3113734829239547" |
| 169 |
}, |
| 170 |
"directories": {} |
| 171 |
}, |
| 172 |
"3.0.0": { |
| 173 |
"name": "has-flag", |
| 174 |
"version": "3.0.0", |
| 175 |
"description": "Check if argv has a specific flag", |
| 176 |
"license": "MIT", |
| 177 |
"repository": { |
| 178 |
"type": "git", |
| 179 |
"url": "git+https://github.com/sindresorhus/has-flag.git" |
| 180 |
}, |
| 181 |
"author": { |
| 182 |
"name": "Sindre Sorhus", |
| 183 |
"email": "[email protected]", |
| 184 |
"url": "sindresorhus.com" |
| 185 |
}, |
| 186 |
"engines": { |
| 187 |
"node": ">=4" |
| 188 |
}, |
| 189 |
"scripts": { |
| 190 |
"test": "xo && ava" |
| 191 |
}, |
| 192 |
"files": [ |
| 193 |
"index.js" |
| 194 |
], |
| 195 |
"keywords": [ |
| 196 |
"has", |
| 197 |
"check", |
| 198 |
"detect", |
| 199 |
"contains", |
| 200 |
"find", |
| 201 |
"flag", |
| 202 |
"cli", |
| 203 |
"command-line", |
| 204 |
"argv", |
| 205 |
"process", |
| 206 |
"arg", |
| 207 |
"args", |
| 208 |
"argument", |
| 209 |
"arguments", |
| 210 |
"getopt", |
| 211 |
"minimist", |
| 212 |
"optimist" |
| 213 |
], |
| 214 |
"devDependencies": { |
| 215 |
"ava": "*", |
| 216 |
"xo": "*" |
| 217 |
}, |
| 218 |
"gitHead": "8b2ca7e693b2c742b29f2399194077b64b9ff781", |
| 219 |
"bugs": { |
| 220 |
"url": "https://github.com/sindresorhus/has-flag/issues" |
| 221 |
}, |
| 222 |
"homepage": "https://github.com/sindresorhus/has-flag#readme", |
| 223 |
"_id": "[email protected]", |
| 224 |
"_shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", |
| 225 |
"_from": ".", |
| 226 |
"_npmVersion": "2.15.11", |
| 227 |
"_nodeVersion": "4.8.4", |
| 228 |
"_npmUser": { |
| 229 |
"name": "sindresorhus", |
| 230 |
"email": "[email protected]" |
| 231 |
}, |
| 232 |
"dist": { |
| 233 |
"shasum": "b5d454dc2199ae225699f3467e5a07f3b955bafd", |
| 234 |
"tarball": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" |
| 235 |
}, |
| 236 |
"maintainers": [ |
| 237 |
{ |
| 238 |
"name": "sindresorhus", |
| 239 |
"email": "[email protected]" |
| 240 |
}, |
| 241 |
{ |
| 242 |
"name": "jbnicolai", |
| 243 |
"email": "[email protected]" |
| 244 |
} |
| 245 |
], |
| 246 |
"_npmOperationalInternal": { |
| 247 |
"host": "s3://npm-registry-packages", |
| 248 |
"tmp": "tmp/has-flag-3.0.0.tgz_1514920915118_0.33958922349847853" |
| 249 |
}, |
| 250 |
"directories": {} |
| 251 |
}, |
| 252 |
"4.0.0": { |
| 253 |
"name": "has-flag", |
| 254 |
"version": "4.0.0", |
| 255 |
"description": "Check if argv has a specific flag", |
| 256 |
"license": "MIT", |
| 257 |
"repository": { |
| 258 |
"type": "git", |
| 259 |
"url": "git+https://github.com/sindresorhus/has-flag.git" |
| 260 |
}, |
| 261 |
"author": { |
| 262 |
"name": "Sindre Sorhus", |
| 263 |
"email": "[email protected]", |
| 264 |
"url": "sindresorhus.com" |
| 265 |
}, |
| 266 |
"engines": { |
| 267 |
"node": ">=8" |
| 268 |
}, |
| 269 |
"scripts": { |
| 270 |
"test": "xo && ava && tsd" |
| 271 |
}, |
| 272 |
"keywords": [ |
| 273 |
"has", |
| 274 |
"check", |
| 275 |
"detect", |
| 276 |
"contains", |
| 277 |
"find", |
| 278 |
"flag", |
| 279 |
"cli", |
| 280 |
"command-line", |
| 281 |
"argv", |
| 282 |
"process", |
| 283 |
"arg", |
| 284 |
"args", |
| 285 |
"argument", |
| 286 |
"arguments", |
| 287 |
"getopt", |
| 288 |
"minimist", |
| 289 |
"optimist" |
| 290 |
], |
| 291 |
"devDependencies": { |
| 292 |
"ava": "^1.4.1", |
| 293 |
"tsd": "^0.7.2", |
| 294 |
"xo": "^0.24.0" |
| 295 |
}, |
| 296 |
"gitHead": "474aa39afca7333d356c022fc5be4d31732bbba3", |
| 297 |
"bugs": { |
| 298 |
"url": "https://github.com/sindresorhus/has-flag/issues" |
| 299 |
}, |
| 300 |
"homepage": "https://github.com/sindresorhus/has-flag#readme", |
| 301 |
"_id": "[email protected]", |
| 302 |
"_npmVersion": "6.4.1", |
| 303 |
"_nodeVersion": "10.15.1", |
| 304 |
"_npmUser": { |
| 305 |
"name": "sindresorhus", |
| 306 |
"email": "[email protected]" |
| 307 |
}, |
| 308 |
"dist": { |
| 309 |
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| 310 |
"shasum": "944771fd9c81c81265c4d6941860da06bb59479b", |
| 311 |
"tarball": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| 312 |
"fileCount": 5, |
| 313 |
"unpackedSize": 4419, |
| 314 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqMqCCRA9TVsSAnZWagAATrIP/22VegVJi5IYjjhsWhNL\nllQoPP8zRlEq/AG6a36bAVuF2lEGtPvtausr/IUbsWZj83n4orGFECflp7Qb\nAsJ3u6zFZLtnp5ug+AhjcqloCM57A05T2RT1YtMpIStapRGsIVc5xudQJtQI\nC+i8ePGQH42iYtLweN7xEw6UKa1ke8UG9hn8FvNP3EkGJOhS59TL8KfsxD8v\nQaNYjOr15UsRsL8K44afDQyhlO4njhr/e+INBDBQhR9vbjTysSxjf/edhzqu\n0CT+WdecdjAMk5egAjIIIbFTQmJtzITfVGJy/UnDmHF3Dyn68QPCOGVbInzy\ncyR858RhE2DAthInEOTYoM5ZfzH2YVSboXcsVZCn2/qcwmKVEyMcGzb0Mzeb\na2jyCMKacWlFO4LbdlXelLaiAfax5auAGiCtDyVfxV1QzBfGbOPoHpmN3drr\nRGxKBoQnlvXrrofmnnpP6sTHQVJJEo86y+F3WzlTwXqp50sC1gq05JC/TNxp\nOIsT5A8RPYmJBvZZKArMo3dHtlvOPPCN9GNERqrKr6ITq55d6h2dylmi46pJ\n920HPH55IKZlB3w73e3ylfAqEmG1KlM3auk/bHqRZJpdPRxUtHP+9pxweDbV\nNYAxJI6hZ3yMhAU8CwbLGBDYZTXSEJt2QxfJj8Yw4lQbQfUScjiML+MmJipS\nM5jU\r\n=+VZG\r\n-----END PGP SIGNATURE-----\r\n" |
| 315 |
}, |
| 316 |
"maintainers": [ |
| 317 |
{ |
| 318 |
"email": "[email protected]", |
| 319 |
"name": "sindresorhus" |
| 320 |
} |
| 321 |
], |
| 322 |
"directories": {}, |
| 323 |
"_npmOperationalInternal": { |
| 324 |
"host": "s3://npm-registry-packages", |
| 325 |
"tmp": "tmp/has-flag_4.0.0_1554565761745_0.3213063984648754" |
| 326 |
}, |
| 327 |
"_hasShrinkwrap": false |
| 328 |
} |
| 329 |
}, |
| 330 |
"readme": "# has-flag [](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\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-has-flag?utm_source=npm-has-flag&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n\n---\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## Security\n\nTo report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", |
| 331 |
"maintainers": [ |
| 332 |
{ |
| 333 |
"email": "[email protected]", |
| 334 |
"name": "sindresorhus" |
| 335 |
} |
| 336 |
], |
| 337 |
"time": { |
| 338 |
"modified": "2019-04-06T15:49:24.714Z", |
| 339 |
"created": "2015-07-07T22:43:54.339Z", |
| 340 |
"1.0.0": "2015-07-07T22:43:54.339Z", |
| 341 |
"2.0.0": "2016-04-11T15:47:58.270Z", |
| 342 |
"3.0.0": "2018-01-02T19:21:56.098Z", |
| 343 |
"4.0.0": "2019-04-06T15:49:21.907Z" |
| 344 |
}, |
| 345 |
"homepage": "https://github.com/sindresorhus/has-flag#readme", |
| 346 |
"keywords": [ |
| 347 |
"has", |
| 348 |
"check", |
| 349 |
"detect", |
| 350 |
"contains", |
| 351 |
"find", |
| 352 |
"flag", |
| 353 |
"cli", |
| 354 |
"command-line", |
| 355 |
"argv", |
| 356 |
"process", |
| 357 |
"arg", |
| 358 |
"args", |
| 359 |
"argument", |
| 360 |
"arguments", |
| 361 |
"getopt", |
| 362 |
"minimist", |
| 363 |
"optimist" |
| 364 |
], |
| 365 |
"repository": { |
| 366 |
"type": "git", |
| 367 |
"url": "git+https://github.com/sindresorhus/has-flag.git" |
| 368 |
}, |
| 369 |
"author": { |
| 370 |
"name": "Sindre Sorhus", |
| 371 |
"email": "[email protected]", |
| 372 |
"url": "sindresorhus.com" |
| 373 |
}, |
| 374 |
"bugs": { |
| 375 |
"url": "https://github.com/sindresorhus/has-flag/issues" |
| 376 |
}, |
| 377 |
"license": "MIT", |
| 378 |
"readmeFilename": "readme.md", |
| 379 |
"users": { |
| 380 |
"michalskuza": true, |
| 381 |
"webzuu": true, |
| 382 |
"aleclarson": true, |
| 383 |
"rubiadias": true, |
| 384 |
"drewigg": true |
| 385 |
} |
| 386 |
} |