{"_id":"parse-code-context","_rev":"16-e0814bdca0fa529139996662ed0cfa69","name":"parse-code-context","description":"Fast and simple way to parse code context for use with documentation from code comments. Parses context from a single line of JavaScript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/parse-code-context/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","lint":"deps -e test,fixtures && verb"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"gitHead":"e7b8364c9a910a382464ebd03ce99847131c65fa","_id":"parse-code-context@0.1.0","_shasum":"619d6b386a5a52d291aec4b75d93cbecaa7ec3f8","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"619d6b386a5a52d291aec4b75d93cbecaa7ec3f8","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.1.0.tgz","integrity":"sha512-y4fRn3QSjeuDOFwouzduAFYo0+YO1ZZlzJ+YXyUQc4muoM0Vb1APXoEtWgGmEYklrkxT87fKMhhCU4vNtqtF9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD69Ys8aHYvoBLlh5UNFHlt4AjWJF+F8QLmLFq4C8bS1gIgRbqgD+ZCDt9QCdIPHZW0qsMIXsmD+1CSQceZiQkQ+dk="}]},"directories":{}},"0.1.1":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/parse-code-context/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","lint":"deps -e test,fixtures && verb"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"gitHead":"a8b8cc634eebc69c1c0a7702392ce96054959948","_id":"parse-code-context@0.1.1","_shasum":"1f51de63f19fdbbca84eac00104d1a4cc99ad5ac","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"1f51de63f19fdbbca84eac00104d1a4cc99ad5ac","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.1.1.tgz","integrity":"sha512-UnTtU91XfNZWQts5TnmFtoa4+AmkJrByVzMzadx3YqKWvD0PYNBaPbd3ZoUvhk5fEHD2MJhRhqjkzv5HL810oA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEXb2e0WqennB3Rau96QdR3EgfeYx+1L6vpZqlCrL4lzAiEA7+R5i1LR4l6l4tR5VllEF1mve+yJa/xdeTIcCTuDcl4="}]},"directories":{}},"0.1.2":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.1.2","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/parse-code-context/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","lint":"deps -e test,fixtures && verb"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"gitHead":"c52d132bf629dd31252c02cbecfc14260b4f68ba","_id":"parse-code-context@0.1.2","_shasum":"6dad6c4e1abb3c4f4f06e2bc4a44c59d55b1e3e3","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"6dad6c4e1abb3c4f4f06e2bc4a44c59d55b1e3e3","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.1.2.tgz","integrity":"sha512-po6BlxL0/YaCgsoSbYa5eJxEcjFBO/Y0m1PkEcv6QefSNnyxo4/tb1m823oa0PHaDFChQ0gSfAWiLpKEKUngxw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTXE3eD94gPXrxI/LwKCN6+pmLRsN9z1vnKokJBhGZZAIhAJ+Tk4hxEuEgw9XpYifqZwbsg07b0f2WBMam8D+7u3wa"}]},"directories":{}},"0.1.3":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.1.3","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/parse-code-context/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","lint":"deps -e test,fixtures && verb"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"gitHead":"97f526ee7d2a131096479ea6ce3e5ce9ba0fd41a","_id":"parse-code-context@0.1.3","_shasum":"b0cafe65c34b916434100033eb334e9d282cb461","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"b0cafe65c34b916434100033eb334e9d282cb461","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.1.3.tgz","integrity":"sha512-z0BGiWseJCILx7w0IkduqF6lQKkOgm82jxU1XgfQj4guUW1JMER+VqSHNDXAP2BhCejuJDrkRnPV5Qm8OiCvtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnOngK0VMbpdMWEOPEMOvB66WLMAPMA6WtnviFvjA/EgIgLTNLqVR3dpdcMqBiGukbBQAyWkWlB4tFa0283wD84x8="}]},"directories":{}},"0.2.0":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":"MIT","files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-istanbul":"^0.10.2","gulp-mocha":"^2.1.3","mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"verb":{"related":{"list":["code-context","strip-comments","snapdragon"]}},"gitHead":"6d30009d51dbd9b71f0a95f26c3842314b0a97c7","_id":"parse-code-context@0.2.0","_shasum":"3e9325ce41d65fb9bbc46779f9e15bb142394759","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3e9325ce41d65fb9bbc46779f9e15bb142394759","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.2.0.tgz","integrity":"sha512-csPJ34iCy1g039/1/BnKjTDhGhKyyWh0E5CwavGpn+YQJKe3twcz/KnV3Fyg/FcETzjvCq5OGbHwY37SLAWRcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxiyrOcQXxzbDdw8uQG2Rdrc9wG0m91OSirRTHDccuPAIgQePwFh/1ijieawVR7dJlMng1YKOlvJmvp7ehabcji44="}]},"directories":{}},"0.2.1":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.2.1","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":"MIT","files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-istanbul":"^0.10.2","gulp-mocha":"^2.1.3","mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"verb":{"plugins":["gulp-format-md"],"related":{"list":["code-context","strip-comments","snapdragon"]}},"gitHead":"41c33011950806322c158e16730a37c88f10cd61","_id":"parse-code-context@0.2.1","_shasum":"a5b5d05f441119be3e7d2c2456b4a56ed816e86c","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a5b5d05f441119be3e7d2c2456b4a56ed816e86c","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.2.1.tgz","integrity":"sha512-TB8ifEYaeVNRzU9pLVmn5Pg41uWbTsyPcs0RvMRLBV3Qhhkuz6kVk+1voOC46bU1ogf/LSddVBv8CmzND/lQaA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGmEpaO1gS2M/UCgu/hJz1miaemLUt789eVZnScWRyegIhANJg1u47fn2o9Yj0c6nFPObIkFJyPFvLjr4XG0KRMaOy"}]},"directories":{}},"0.2.2":{"name":"parse-code-context","description":"Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"0.2.2","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":"MIT","files":["index.js"],"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp":"^3.9.0","gulp-eslint":"^1.0.0","gulp-format-md":"^0.1.4","gulp-istanbul":"^0.10.2","gulp-mocha":"^2.1.3","mocha":"*","should":"*"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"verb":{"plugins":["gulp-format-md"],"related":{"list":["code-context","strip-comments","snapdragon"]}},"gitHead":"34bfb38229bc6bb7b492d390e15570997ce666ab","_id":"parse-code-context@0.2.2","_shasum":"144b8afb7219482d7e88c1eb6a765596f3a6ac0d","_from":".","_npmVersion":"3.3.6","_nodeVersion":"5.0.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"144b8afb7219482d7e88c1eb6a765596f3a6ac0d","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-0.2.2.tgz","integrity":"sha512-KXuyOOvLSjubf5bzmYOaK09qUVJSGzAbN1AR/KtkIcP7U5j0BmNun9vOMxrCvkxiRVKoVXTm2YrgIYM4Vfw8tw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGxjwNtzRiwAm+BCO2Ik/+2lDMn9VQmoWUzCzDcog862AiEAtkwH+qhIMb8M7GTpQJ5RqrpKVUN77YnhGnMr4kvemQc="}]},"directories":{}},"1.0.0":{"name":"parse-code-context","description":"Fast and simple way to parse code context for use with documentation from code comments. Parses context from a single line of JavaScript, for functions, variable declarations, methods, prototype properties, prototype methods etc.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/parse-code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/parse-code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":"MIT","main":"index.js","engines":{"node":">=6"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^2.0.0","mocha":"^5.2.0"},"keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["code-context","snapdragon","strip-comments"]},"lint":{"reflinks":true}},"gitHead":"04455f8f65f0ea5913438576b06f7114de61d0be","_id":"parse-code-context@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"integrity":"sha512-OZQaqKaQnR21iqhlnPfVisFjBWjhnMl5J9MgbP8xC+EwoVqbXrq78lp+9Zb3ahmLzrIX5Us/qbvBnaS3hkH6OA==","shasum":"718c295c593d0d19a37f898473268cc75e98de1e","tarball":"https://registry.npmjs.org/parse-code-context/-/parse-code-context-1.0.0.tgz","fileCount":4,"unpackedSize":19644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb+SxrCRA9TVsSAnZWagAAs2IP/1R0oKCEcYrwsojLLQ+t\nBOLwz0fQ9NIKe+EgwwVU4SKI/aLI5Ef+p6ZTz9eL/+eZGmLnztPUeAIaJX7m\n2Vw/qNshttYr93xAQkGdr//VKx7hxQlw8NJDbHqfquvUkLuA8OmwwItBMshd\njJ13ju4i4rNC7IBzSoDpXK087XAtZBbyKovFvtgSeFjxSjhAvMJ8DEIpqqZ2\n28iTBNh+mIYXPGbZl9Fzf0vTJRRd8FBJGbLEFf5Q6CctHHQAiDldqR1JTJmV\nZ8bbkhLd/qdy9/C0BWcrKY3V4I1Flo2xHFZ8aId5H6mu0eRcoEz8VH3cY/gT\n7P4EENIN142dryCf7P7UxK9tMSsx1+xAfinlcJIowD5FggSApQ/8ZF9BBorL\nb3Njseu7EL+iIjlhMAMM0aikPm0iNor5QAp9tOfka2hAsFYLauAHDkuaUzJQ\n4G/e8VKm6zt37IUHldXhkrO4op5NjIjoVPmDH/vJtlSDfY1apVydAVAFi7lQ\ni5DbrBssmeDPhpFdwsRohR3AoJ0CpmigCt8p4iW0wZJF6F4rHpKBLN446PPn\nGrRWrmsxx0Sglc58bYRV6TGNHTbFothcN4hMbLLXYLAeAWOnlEbK185vLEQj\nHNW+HYAQhTsp5PCSjjQvculALkKVVn5TRYfWXwzr81v2YvzkFvIYeGTksGty\nxTEP\r\n=3beq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaeRf+2clFKr7LVduYDdoFX+wt9q/PuZOR562NELNzZQIgeD/eBS8FmR81lQlPKrpBFoVWOtkkL/cr5kLCbvkwjMA="}]},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-code-context_1.0.0_1543056490517_0.621694501883123"},"_hasShrinkwrap":false}},"readme":"# parse-code-context [![NPM version](https://img.shields.io/npm/v/parse-code-context.svg?style=flat)](https://www.npmjs.com/package/parse-code-context) [![NPM monthly downloads](https://img.shields.io/npm/dm/parse-code-context.svg?style=flat)](https://npmjs.org/package/parse-code-context) [![NPM total downloads](https://img.shields.io/npm/dt/parse-code-context.svg?style=flat)](https://npmjs.org/package/parse-code-context) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/parse-code-context.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/parse-code-context)\n\n> Fast and simple way to parse code context for use with documentation from code comments. Parses context from a single line of JavaScript, for functions, variable declarations, methods, prototype properties, prototype methods etc.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save parse-code-context\n```\n\n## Getting started\n\n* [Usage](#usage)\n* [API](#api)\n* [Examples](#examples)\n* [Custom parsers](#custom-parsers)\n\n## Usage\n\n```js\nconst parse = require('parse-code-context');\nconsole.log(parse('function app(a, b, c) {\\n\\n}'));\n```\n\n## API\n\n### [Parser](index.js#L18)\n\nCreate an instance of `Parser` with the given `string`, optionally passing a `parent` name for namespacing methods\n\n**Params**\n\n* `str` **{String}**\n* `parent` **{String}**\n\n**Example**\n\n```js\nconst { Parser } = require('parse-code-context');\nconst parser = new Parser('function foo(a, b, c) {}');\n```\n\n### [.name](index.js#L35)\n\nConvenience method for creating a property name\nthat is prefixed with the parent namespace, if defined.\n\n**Params**\n\n* `name` **{String}**\n* `returns` **{String}**\n\n### [.capture](index.js#L60)\n\nRegister a parser to use (in addition to those already registered as default parsers) with the given `regex` and function.\n\n**Params**\n\n* `regex` **{RegExp}**\n* `fn` **{Function}**\n* `returns` **{Object}**: The instance for chaining\n\n**Example**\n\n```js\nconst parser = new Parser('function foo(a, b, c){}');\n  .capture(/function\\s*([\\w$]+)\\s*\\(([^)]+)/, (match) => {\n    return {\n       name: match[1],\n       params: matc(h[2] || '').split(/[,\\s]/)\n    };\n  });\n```\n\n### [.parse](index.js#L73)\n\nParse the string passed to the constructor with all registered parsers.\n\n* `returns` **{Object|Null}**\n\n## Examples\n\n### function statement\n\n```js\nconst context = parse('function app(a, b, c) {\\n\\n}');\nconsole.log(context);\n```\n\nResults in:\n\n```js\n{ type: 'function statement',\n  name: 'app',\n  params: [ 'a', 'b', 'c' ],\n  string: 'app()',\n  original: 'function app() {\\n\\n}' }\n```\n\n### function expression\n\n```js\nparse(\"var app = function(a, b, c) {\\n\\n}\");\n```\n\nResults in:\n\n```js\n{ type: 'function expression',\n  name: 'app',\n  params: [ 'a', 'b', 'c' ],\n  string: 'app()',\n  original: 'var app = function() {\\n\\n}' }\n```\n\n### `module.exports` function expression\n\n```js\nparse(\"module.exports = function foo(a, b, c) {\\n\\n}\");\n```\n\nResults in:\n\n```js\n{ type: 'function expression',\n  receiver: 'module.exports',\n  name: 'foo',\n  params: [ 'a', 'b', 'c' ],\n  string: 'module.exports()',\n  original: 'module.exports = function foo(a, b, c) {\\n\\n}' }\n```\n\n### `module.exports` method\n\n```js\nparse(\"module.exports = function() {\\n\\n}\");\n```\n\nResults in:\n\n```js\n{ type: 'method',\n  receiver: 'module.exports',\n  name: '',\n  params: [],\n  string: 'module.exports.() {\\n\\n}()',\n  original: 'module.exports = function() {\\n\\n}' }\n```\n\n### prototype method\n\n```js\nparse(\"Template.prototype.get = function() {}\");\n```\n\nResults in:\n\n```js\n{ type: 'prototype method',\n  class: 'Template',\n  name: 'get',\n  params: [],\n  string: 'Template.prototype.get()',\n  original: 'Template.prototype.get = function() {}' }\n```\n\n### prototype property\n\n```js\nparse(\"Template.prototype.enabled = true;\\nasdf\");\n```\n\nResults in:\n\n```js\n{ type: 'prototype property',\n  class: 'Template',\n  name: 'enabled',\n  value: 'true',\n  string: 'Template.prototype.enabled',\n  original: 'Template.prototype.enabled = true;\\nasdf' }\n```\n\n### method\n\n```js\nparse(\"option.get = function() {}\");\n```\n\nResults in:\n\n```js\n{ type: 'method',\n  receiver: 'option',\n  name: 'get',\n  params: [],\n  string: 'option.get()',\n  original: 'option.get = function() {}' }\n```\n\n### property\n\n```js\nparse(\"option.name = \\\"delims\\\";\\nasdf\");\n```\n\nResults in:\n\n```js\n{ type: 'property',\n  receiver: 'option',\n  name: 'name',\n  value: '\"delims\"',\n  string: 'option.name',\n  original: 'option.name = \"delims\";\\nasdf' }\n```\n\n### declaration\n\n```js\nparse(\"var name = \\\"delims\\\";\\nasdf\");\n```\n\nResults in:\n\n```js\n{ type: 'declaration',\n  name: 'name',\n  value: '\"delims\"',\n  string: 'name',\n  original: 'var name = \"delims\";\\nasdf' }\n\n```\n\n### function statement params\n\n```js\nparse(\"function app(a, b) {\\n\\n}\");\n```\n\nResults in:\n\n```js\n{ type: 'function statement',\n  name: 'app',\n  params: [ 'a', 'b' ],\n  string: 'app()',\n  original: 'function app(a, b) {\\n\\n}' }\n```\n\n### function expression params\n\n```js\nparse(\"var app = function(foo, bar) {\\n\\n}\");\n```\n\nResults in:\n\n```js\n{ type: 'function expression',\n  name: 'app',\n  params: [ 'foo', 'bar' ],\n  string: 'app()',\n  original: 'var app = function(foo, bar) {\\n\\n}' }\n```\n\n### function expression params\n\n```js\nparse(\"var app=function(foo,bar) {\\n\\n}\");\n```\n\nResults in:\n\n```js\n{ type: 'function expression',\n  name: 'app',\n  params: [ 'foo', 'bar' ],\n  string: 'app()',\n  original: 'var app=function(foo,bar) {\\n\\n}' }\n```\n\n### prototype method params\n\n```js\nparse(\"Template.prototype.get = function(key, value, options) {}\");\n```\n\nResults in:\n\n```js\n{ type: 'prototype method',\n  class: 'Template',\n  name: 'get',\n  params: [ 'key', 'value', 'options' ],\n  string: 'Template.prototype.get()',\n  original: 'Template.prototype.get = function(key, value, options) {}' }\n```\n\n## Custom parsers\n\nInstantiate the `Parser` class to register custom parsers.\n\n```js\nconst { Parser} = require('parse-code-context');\nconst parser = new Parser();\n\nparser.capture(/foo\\(([^)]+)\\)/, match => {\n  return {\n    params: match[1].split(/[,\\s]+/)\n  };\n});\n\nconsole.log(parser.parse('foo(a, b, c)'));\n```\n\n## Credit\n\nRegex was originally sourced and modified from [https://github.com/visionmedia/dox](https://github.com/visionmedia/dox).\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [code-context](https://www.npmjs.com/package/code-context): Parse a string of javascript to determine the context for functions, variables and comments based… [more](https://github.com/jonschlinkert/code-context) | [homepage](https://github.com/jonschlinkert/code-context \"Parse a string of javascript to determine the context for functions, variables and comments based on the code that follows.\")\n* [snapdragon](https://www.npmjs.com/package/snapdragon): Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map… [more](https://github.com/here-be/snapdragon) | [homepage](https://github.com/here-be/snapdragon \"Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.\")\n* [strip-comments](https://www.npmjs.com/package/strip-comments): Strip comments from code. Removes line comments, block comments, the first comment only, or all… [more](https://github.com/jonschlinkert/strip-comments) | [homepage](https://github.com/jonschlinkert/strip-comments \"Strip comments from code. Removes line comments, block comments, the first comment only, or all comments. Optionally leave protected comments unharmed.\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 24, 2018._","maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2022-06-23T10:30:54.611Z","created":"2015-02-13T18:54:30.621Z","0.1.0":"2015-02-13T18:54:30.621Z","0.1.1":"2015-02-13T18:57:56.533Z","0.1.2":"2015-02-13T19:13:45.109Z","0.1.3":"2015-02-13T19:16:01.960Z","0.2.0":"2015-11-04T12:58:31.471Z","0.2.1":"2015-12-20T14:26:57.920Z","0.2.2":"2015-12-30T11:47:29.319Z","1.0.0":"2018-11-24T10:48:10.657Z"},"homepage":"https://github.com/jonschlinkert/parse-code-context","keywords":["args","arguments","code","code-context","context","declaration","function","method","parse","property","prototype","statement"],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/parse-code-context.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/jonschlinkert/parse-code-context/issues"},"license":"MIT","readmeFilename":"README.md","users":{"pandao":true}}