{"_id":"doctrine-temporary-fork","_rev":"4133059","name":"doctrine-temporary-fork","description":"JSDoc parser","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"time":{"modified":"2026-03-01T18:41:30.000Z","created":"2017-04-21T21:05:19.498Z","2.1.0":"2019-04-18T16:40:02.002Z","2.0.1":"2018-04-11T17:22:45.770Z","2.0.0-alpha-allowarrayindex":"2017-04-21T21:05:19.498Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/eslint/doctrine.git"},"versions":{"2.1.0":{"name":"doctrine-temporary-fork","description":"JSDoc parser","homepage":"https://github.com/eslint/doctrine","main":"lib/doctrine.js","version":"2.1.0","engines":{"node":">=0.10.0"},"directories":{"lib":"./lib"},"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"repository":{"type":"git","url":"git+https://github.com/eslint/doctrine.git"},"devDependencies":{"coveralls":"^2.11.2","dateformat":"^1.0.11","eslint":"^1.10.3","eslint-release":"^0.10.0","linefix":"^0.1.1","mocha":"^3.4.2","npm-license":"^0.3.1","nyc":"^10.3.2","semver":"^5.0.3","shelljs":"^0.5.3","shelljs-nodecli":"^0.1.1","should":"^5.0.1","standard-version":"^4.3.0"},"license":"Apache-2.0","scripts":{"pretest":"npm run lint","test":"nyc mocha","coveralls":"nyc report --reporter=text-lcov | coveralls","lint":"eslint lib/","release":"standard-version","ci-release":"eslint-ci-release","alpharelease":"eslint-prerelease alpha","betarelease":"eslint-prerelease beta"},"dependencies":{"esutils":"^2.0.2"},"gitHead":"7b51af7fe4d1d0fdf502a3d805913dfe89a6243b","bugs":{"url":"https://github.com/eslint/doctrine/issues"},"_id":"doctrine-temporary-fork@2.1.0","_nodeVersion":"10.14.1","_npmVersion":"6.9.0","dist":{"shasum":"36f2154f556ee4f1e60311d391cd23de5187ed57","size":22630,"noattachment":false,"key":"/doctrine-temporary-fork/-/doctrine-temporary-fork-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/doctrine-temporary-fork/download/doctrine-temporary-fork-2.1.0.tgz"},"_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/doctrine-temporary-fork_2.1.0_1555605601877_0.21527055444574317"},"_hasShrinkwrap":false,"publish_time":1555605602002,"_cnpm_publish_time":1555605602002,"_cnpmcore_publish_time":"2021-12-16T14:44:53.970Z"},"2.0.1":{"name":"doctrine-temporary-fork","description":"JSDoc parser","homepage":"https://github.com/eslint/doctrine","main":"lib/doctrine.js","version":"2.0.1","engines":{"node":">=0.10.0"},"directories":{"lib":"./lib"},"files":["lib"],"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"repository":{"type":"git","url":"git+https://github.com/eslint/doctrine.git"},"devDependencies":{"coveralls":"^2.11.2","dateformat":"^1.0.11","eslint":"^1.10.3","eslint-release":"^0.10.0","linefix":"^0.1.1","mocha":"^3.4.2","npm-license":"^0.3.1","nyc":"^10.3.2","semver":"^5.0.3","shelljs":"^0.5.3","shelljs-nodecli":"^0.1.1","should":"^5.0.1","standard-version":"^4.3.0"},"license":"Apache-2.0","scripts":{"pretest":"npm run lint","test":"nyc mocha","coveralls":"nyc report --reporter=text-lcov | coveralls","lint":"eslint lib/","release":"standard-version","ci-release":"eslint-ci-release","alpharelease":"eslint-prerelease alpha","betarelease":"eslint-prerelease beta"},"dependencies":{"esutils":"^2.0.2"},"gitHead":"403a117d297050a03b35fa8d074d9c89b8bde005","bugs":{"url":"https://github.com/eslint/doctrine/issues"},"_id":"doctrine-temporary-fork@2.0.1","_npmVersion":"5.8.0","_nodeVersion":"8.9.4","_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"dist":{"shasum":"23f0b6275c65f48893324b02338178e496b2e4bf","size":22523,"noattachment":false,"key":"/doctrine-temporary-fork/-/doctrine-temporary-fork-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/doctrine-temporary-fork/download/doctrine-temporary-fork-2.0.1.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/doctrine-temporary-fork_2.0.1_1523467365681_0.23889595905711403"},"_hasShrinkwrap":false,"publish_time":1523467365770,"_cnpm_publish_time":1523467365770,"_cnpmcore_publish_time":"2021-12-16T14:44:54.204Z"},"2.0.0-alpha-allowarrayindex":{"name":"doctrine-temporary-fork","description":"JSDoc parser","homepage":"https://github.com/eslint/doctrine","main":"lib/doctrine.js","version":"2.0.0-alpha-allowarrayindex","engines":{"node":">=0.10.0"},"directories":{"lib":"./lib"},"files":["lib","LICENSE.BSD","LICENSE.closure-compiler","LICENSE.esprima","README.md"],"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"repository":{"type":"git","url":"git+https://github.com/eslint/doctrine.git"},"devDependencies":{"coveralls":"^2.11.2","dateformat":"^1.0.11","eslint":"^1.10.3","eslint-release":"^0.10.0","istanbul":"^0.4.1","linefix":"^0.1.1","mocha":"^2.3.3","npm-license":"^0.3.1","semver":"^5.0.3","shelljs":"^0.5.3","shelljs-nodecli":"^0.1.1","should":"^5.0.1"},"license":"Apache-2.0","scripts":{"test":"npm run lint && node Makefile.js test","lint":"eslint lib/","release":"eslint-release","ci-release":"eslint-ci-release","alpharelease":"eslint-prerelease alpha","betarelease":"eslint-prerelease beta"},"dependencies":{"esutils":"^2.0.2","isarray":"^1.0.0"},"gitHead":"bef11c62584313a60478e5fa9f0b25930e7bd70e","bugs":{"url":"https://github.com/eslint/doctrine/issues"},"_id":"doctrine-temporary-fork@2.0.0-alpha-allowarrayindex","_shasum":"40015a867eb27e75b26c828b71524f137f89f9f0","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"tmcw","email":"tom+npm@macwright.org"},"dist":{"shasum":"40015a867eb27e75b26c828b71524f137f89f9f0","size":20991,"noattachment":false,"key":"/doctrine-temporary-fork/-/doctrine-temporary-fork-2.0.0-alpha-allowarrayindex.tgz","tarball":"http://registry.cnpm.dingdandao.com/doctrine-temporary-fork/download/doctrine-temporary-fork-2.0.0-alpha-allowarrayindex.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/doctrine-temporary-fork-2.0.0-alpha-allowarrayindex.tgz_1492808717504_0.7500158187467605"},"publish_time":1492808719498,"_hasShrinkwrap":false,"_cnpm_publish_time":1492808719498,"_cnpmcore_publish_time":"2021-12-16T14:44:54.472Z"}},"readme":"[![NPM version][npm-image]][npm-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][coveralls-image]][coveralls-url]\n[![Downloads][downloads-image]][downloads-url]\n[![Join the chat at https://gitter.im/eslint/doctrine](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/eslint/doctrine?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n# Doctrine\n\nDoctrine is a [JSDoc](http://usejsdoc.org) parser that parses documentation comments from JavaScript (you need to pass in the comment, not a whole JavaScript file).\n\n## Installation\n\nYou can install Doctrine using [npm](https://npmjs.com):\n\n```\n$ npm install doctrine --save-dev\n```\n\nDoctrine can also be used in web browsers using [Browserify](http://browserify.org).\n\n## Usage\n\nRequire doctrine inside of your JavaScript:\n\n```js\nvar doctrine = require(\"doctrine\");\n```\n\n### parse()\n\nThe primary method is `parse()`, which accepts two arguments: the JSDoc comment to parse and an optional options object. The available options are:\n\n* `unwrap` - set to `true` to delete the leading `/**`, any `*` that begins a line, and the trailing `*/` from the source text. Default: `false`.\n* `tags` - an array of tags to return. When specified, Doctrine returns only tags in this array. For example, if `tags` is `[\"param\"]`, then only `@param` tags will be returned. Default: `null`.\n* `recoverable` - set to `true` to keep parsing even when syntax errors occur. Default: `false`.\n* `sloppy` - set to `true` to allow optional parameters to be specified in brackets (`@param {string} [foo]`). Default: `false`.\n* `lineNumbers` - set to `true` to add `lineNumber` to each node, specifying the line on which the node is found in the source. Default: `false`.\n* `range` - set to `true` to add `range` to each node, specifying the start and end index of the node in the original comment. Default: `false`.\n\nHere's a simple example:\n\n```js\nvar ast = doctrine.parse(\n    [\n        \"/**\",\n        \" * This function comment is parsed by doctrine\",\n        \" * @param {{ok:String}} userName\",\n        \"*/\"\n    ].join('\\n'), { unwrap: true });\n```\n\nThis example returns the following AST:\n\n    {\n        \"description\": \"This function comment is parsed by doctrine\",\n        \"tags\": [\n            {\n                \"title\": \"param\",\n                \"description\": null,\n                \"type\": {\n                    \"type\": \"RecordType\",\n                    \"fields\": [\n                        {\n                            \"type\": \"FieldType\",\n                            \"key\": \"ok\",\n                            \"value\": {\n                                \"type\": \"NameExpression\",\n                                \"name\": \"String\"\n                            }\n                        }\n                    ]\n                },\n                \"name\": \"userName\"\n            }\n        ]\n    }\n\nSee the [demo page](http://eslint.org/doctrine/demo/) more detail.\n\n## Team\n\nThese folks keep the project moving and are resources for help:\n\n* Nicholas C. Zakas ([@nzakas](https://github.com/nzakas)) - project lead\n* Yusuke Suzuki ([@constellation](https://github.com/constellation)) - reviewer\n\n## Contributing\n\nIssues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/doctrine/issues).\n\n## Frequently Asked Questions\n\n### Can I pass a whole JavaScript file to Doctrine?\n\nNo. Doctrine can only parse JSDoc comments, so you'll need to pass just the JSDoc comment to Doctrine in order to work.\n\n\n### License\n\n#### doctrine\n\nCopyright JS Foundation and other contributors, https://js.foundation\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n#### esprima\n\nsome of functions is derived from esprima\n\nCopyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about)\n (twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n\n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n#### closure-compiler\n\nsome of extensions is derived from closure-compiler\n\nApache License\nVersion 2.0, January 2004\nhttp://www.apache.org/licenses/\n\n\n### Where to ask for help?\n\nJoin our [Chatroom](https://gitter.im/eslint/doctrine)\n\n[npm-image]: https://img.shields.io/npm/v/doctrine.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/doctrine\n[travis-image]: https://img.shields.io/travis/eslint/doctrine/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/eslint/doctrine\n[coveralls-image]: https://img.shields.io/coveralls/eslint/doctrine/master.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/eslint/doctrine?branch=master\n[downloads-image]: http://img.shields.io/npm/dm/doctrine.svg?style=flat-square\n[downloads-url]: https://www.npmjs.com/package/doctrine\n","_attachments":{},"homepage":"https://github.com/eslint/doctrine","bugs":{"url":"https://github.com/eslint/doctrine/issues"},"license":"Apache-2.0"}