package.json 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {
  2. "_args": [
  3. [
  4. {
  5. "raw": "yargs-parser@^5.0.0",
  6. "scope": null,
  7. "escapedName": "yargs-parser",
  8. "name": "yargs-parser",
  9. "rawSpec": "^5.0.0",
  10. "spec": ">=5.0.0 <6.0.0",
  11. "type": "range"
  12. },
  13. "/mnt/Data/bach/Documents/ola/OLA#4/OLA#4DOC/sys/node_modules/yargs"
  14. ]
  15. ],
  16. "_from": "yargs-parser@>=5.0.0 <6.0.0",
  17. "_id": "yargs-parser@5.0.0",
  18. "_inCache": true,
  19. "_location": "/yargs-parser",
  20. "_nodeVersion": "0.10.48",
  21. "_npmOperationalInternal": {
  22. "host": "packages-18-east.internal.npmjs.com",
  23. "tmp": "tmp/yargs-parser-5.0.0.tgz_1487447930908_0.674228576477617"
  24. },
  25. "_npmUser": {
  26. "name": "bcoe",
  27. "email": "ben@npmjs.com"
  28. },
  29. "_npmVersion": "2.15.1",
  30. "_phantomChildren": {},
  31. "_requested": {
  32. "raw": "yargs-parser@^5.0.0",
  33. "scope": null,
  34. "escapedName": "yargs-parser",
  35. "name": "yargs-parser",
  36. "rawSpec": "^5.0.0",
  37. "spec": ">=5.0.0 <6.0.0",
  38. "type": "range"
  39. },
  40. "_requiredBy": [
  41. "/yargs"
  42. ],
  43. "_resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz",
  44. "_shasum": "275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a",
  45. "_shrinkwrap": null,
  46. "_spec": "yargs-parser@^5.0.0",
  47. "_where": "/mnt/Data/bach/Documents/ola/OLA#4/OLA#4DOC/sys/node_modules/yargs",
  48. "author": {
  49. "name": "Ben Coe",
  50. "email": "ben@npmjs.com"
  51. },
  52. "bugs": {
  53. "url": "https://github.com/yargs/yargs-parser/issues"
  54. },
  55. "dependencies": {
  56. "camelcase": "^3.0.0"
  57. },
  58. "description": "the mighty option parser used by yargs",
  59. "devDependencies": {
  60. "chai": "^3.5.0",
  61. "coveralls": "^2.11.12",
  62. "mocha": "^3.0.1",
  63. "nyc": "^10.0.0",
  64. "standard": "^8.0.0",
  65. "standard-version": "^4.0.0"
  66. },
  67. "directories": {},
  68. "dist": {
  69. "shasum": "275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a",
  70. "tarball": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz"
  71. },
  72. "files": [
  73. "lib",
  74. "index.js"
  75. ],
  76. "gitHead": "2c95ba9e5ad3b8bb6248bf41f013d9bd3700d56f",
  77. "homepage": "https://github.com/yargs/yargs-parser#readme",
  78. "keywords": [
  79. "argument",
  80. "parser",
  81. "yargs",
  82. "command",
  83. "cli",
  84. "parsing",
  85. "option",
  86. "args",
  87. "argument"
  88. ],
  89. "license": "ISC",
  90. "main": "index.js",
  91. "maintainers": [
  92. {
  93. "name": "bcoe",
  94. "email": "ben@npmjs.com"
  95. },
  96. {
  97. "name": "nexdrew",
  98. "email": "andrew@npmjs.com"
  99. }
  100. ],
  101. "name": "yargs-parser",
  102. "optionalDependencies": {},
  103. "readme": "# yargs-parser\n\n[![Build Status](https://travis-ci.org/yargs/yargs-parser.png)](https://travis-ci.org/yargs/yargs-parser)\n[![Coverage Status](https://coveralls.io/repos/yargs/yargs-parser/badge.svg?branch=)](https://coveralls.io/r/yargs/yargs-parser?branch=master)\n[![NPM version](https://img.shields.io/npm/v/yargs-parser.svg)](https://www.npmjs.com/package/yargs-parser)\n[![Windows Tests](https://img.shields.io/appveyor/ci/bcoe/yargs-parser/master.svg?label=Windows%20Tests)](https://ci.appveyor.com/project/bcoe/yargs-parser)\n[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)\n\n\nThe mighty option parser used by [yargs](https://github.com/yargs/yargs).\n\nvisit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions.\n\n<img width=\"250\" src=\"https://github.com/yargs/yargs-parser/blob/master/yargs-logo.png\">\n\n## Example\n\n```sh\nnpm i yargs-parser --save\n```\n\n```js\nvar argv = require('yargs-parser')(process.argv.slice(2))\nconsole.log(argv)\n```\n\n```sh\nnode example.js --foo=33 --bar hello\n{ _: [], foo: 33, bar: 'hello' }\n```\n\n_or parse a string!_\n\n```js\nvar argv = require('./')('--foo=99 --bar=33')\nconsole.log(argv)\n```\n\n```sh\n{ _: [], foo: 99, bar: 33 }\n```\n\nConvert an array of mixed types before passing to `yargs-parser`:\n\n```js\nvar parse = require('yargs-parser')\nparse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string\nparse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings\n```\n\n## API\n\n### require('yargs-parser')(args, opts={})\n\nParses command line arguments returning a simple mapping of keys and values.\n\n**expects:**\n\n* `args`: a string or array of strings representing the options to parse.\n* `opts`: provide a set of hints indicating how `args` should be parsed:\n * `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`.\n * `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.\n * `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`.\n * `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed).\n * `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided\n (or throws an error), e.g. `{coerce: {foo: function (arg) {return modifiedArg}}}`.\n * `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`.\n * `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`.\n * `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed.\n * `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`.\n * `opts.normalize`: `path.normalize()` will be applied to values set to this key.\n * `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`).\n * `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)).\n * `opts.number`: keys should be treated as numbers.\n\n**returns:**\n\n* `obj`: an object representing the parsed value of `args`\n * `key/value`: key value pairs for each argument and their aliases.\n * `_`: an array representing the positional arguments.\n\n### require('yargs-parser').detailed(args, opts={})\n\nParses a command line string, returning detailed information required by the\nyargs engine.\n\n**expects:**\n\n* `args`: a string or array of strings representing options to parse.\n* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`.\n\n**returns:**\n\n* `argv`: an object representing the parsed value of `args`\n * `key/value`: key value pairs for each argument and their aliases.\n * `_`: an array representing the positional arguments.\n* `error`: populated with an error object if an exception occurred during parsing.\n* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`.\n* `newAliases`: any new aliases added via camel-case expansion.\n* `configuration`: the configuration loaded from the `yargs` stanza in package.json.\n\n<a name=\"configuration\"></a>\n### Configuration\n\nThe yargs-parser applies several automated transformations on the keys provided\nin `args`. These features can be turned on and off using the `configuration` field\nof `opts`.\n\n```js\nvar parsed = parser(['--no-dice'], {\n configuration: {\n 'boolean-negation': false\n }\n})\n```\n\n### short option groups\n\n* default: `true`.\n* key: `short-option-groups`.\n\nShould a group of short-options be treated as boolean flags?\n\n```sh\nnode example.js -abc\n{ _: [], a: true, b: true, c: true }\n```\n\n_if disabled:_\n\n```sh\nnode example.js -abc\n{ _: [], abc: true }\n```\n\n### camel-case expansion\n\n* default: `true`.\n* key: `camel-case-expansion`.\n\nShould hyphenated arguments be expanded into camel-case aliases?\n\n```sh\nnode example.js --foo-bar\n{ _: [], 'foo-bar': true, fooBar: true }\n```\n\n_if disabled:_\n\n```sh\nnode example.js --foo-bar\n{ _: [], 'foo-bar': true }\n```\n\n### dot-notation\n\n* default: `true`\n* key: `dot-notation`\n\nShould keys that contain `.` be treated as objects?\n\n```sh\nnode example.js --foo.bar\n{ _: [], foo: { bar: true } }\n```\n\n_if disabled:_\n\n```sh\nnode example.js --foo.bar\n{ _: [], \"foo.bar\": true }\n```\n\n### parse numbers\n\n* default: `true`\n* key: `parse-numbers`\n\nShould keys that look like numbers be treated as such?\n\n```sh\nnode example.js --foo=99.3\n{ _: [], foo: 99.3 }\n```\n\n_if disabled:_\n\n```sh\nnode example.js --foo=99.3\n{ _: [], foo: \"99.3\" }\n```\n\n### boolean negation\n\n* default: `true`\n* key: `boolean-negation`\n\nShould variables prefixed with `--no` be treated as negations?\n\n```sh\nnode example.js --no-foo\n{ _: [], foo: false }\n```\n\n_if disabled:_\n\n```sh\nnode example.js --no-foo\n{ _: [], \"no-foo\": true }\n```\n\n### duplicate arguments array\n\n* default: `true`\n* key: `duplicate-arguments-array`\n\nShould arguments be coerced into an array when duplicated:\n\n```sh\nnode example.js -x 1 -x 2\n{ _: [], x: [1, 2] }\n```\n\n_if disabled:_\n\n```sh\nnode example.js -x 1 -x 2\n{ _: [], x: 2 }\n```\n\n### flatten duplicate arrays\n\n* default: `true`\n* key: `flatten-duplicate-arrays`\n\nShould array arguments be coerced into a single array when duplicated:\n\n```sh\nnode example.js -x 1 2 -x 3 4\n{ _: [], x: [1, 2, 3, 4] }\n```\n\n_if disabled:_\n\n```sh\nnode example.js -x 1 2 -x 3 4\n{ _: [], x: [[1, 2], [3, 4]] }\n```\n\n## Special Thanks\n\nThe yargs project evolves from optimist and minimist. It owes its\nexistence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \\o/\n\n## License\n\nISC\n",
  104. "readmeFilename": "README.md",
  105. "repository": {
  106. "url": "git+ssh://git@github.com/yargs/yargs-parser.git"
  107. },
  108. "scripts": {
  109. "coverage": "nyc report --reporter=text-lcov | coveralls",
  110. "pretest": "standard",
  111. "release": "standard-version",
  112. "test": "nyc mocha test/*.js"
  113. },
  114. "version": "5.0.0"
  115. }