{"name":"code-context","description":"Parses a string of javascript to determine the context for functions, variables and comments based on the code that follows.","version":"0.3.0","homepage":"https://github.com/jonschlinkert/code-context","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/code-context.git"},"bugs":{"url":"https://github.com/jonschlinkert/code-context/issues"},"licenses":[{"type":"MIT","url":"https://github.com/jonschlinkert/code-context/blob/master/LICENSE-MIT"}],"keywords":["code","comment","context","declaration","docs","documentation","expression","extract","function","javascript","js","method","parse","property","prototype","statement"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"devDependencies":{"fs-utils":"^0.4.3","mocha":"*","should":"^4.0.4"},"dependencies":{"extract-comments":"^0.4.1"},"_id":"code-context@0.3.0","_shasum":"c0c609aca37c5bf967c63375d052544a8d3fd8a1","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"},{"name":"doowb","email":"brian.woodward@gmail.com"}],"dist":{"shasum":"c0c609aca37c5bf967c63375d052544a8d3fd8a1","tarball":"http://registry-npm.ywwl.com/code-context/download/code-context-0.3.0.tgz","integrity":"sha512-QA92o89setClUXPR1D7pciAGmmX18rV59F73A1C59LbJhC3f4cmKZs1kJvmDVsWoxixTju8sWwkxWm/obX4k3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHa9Ax2j9RWnADSOgCYXU4v+rv+wSE8VhTZ5q5OxsmusAiBVtc9ZN/8k+LMmqp9cLkL+uLPjhNIF9ewxtSHnc62h2w=="}],"size":26765,"noattachment":false,"key":"/code-context/-/code-context-0.3.0.tgz"},"directories":{},"readme":"# code-context [![NPM version](https://badge.fury.io/js/code-context.svg)](http://badge.fury.io/js/code-context)  [![Build Status](https://travis-ci.org/jonschlinkert/code-context.svg)](https://travis-ci.org/jonschlinkert/code-context)\n\n> Parse a string of javascript to determine the context for functions, variables and comments based on the code that follows.\n\n**Currently supports:**\n\n* code comments\n* function statements\n* function expressions\n* prototype methods\n* prototype properties\n* methods\n* properties\n* declarations\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i code-context --save\n```\n\n## Usage\n\n```js\nvar parseContext = require('code-context');\n```\n\nGiven the following code in `my-app.js`:\n\n```js\n/**\n * My app\n */\nvar app = function(str) {\n  return str\n};\n```\n\nPass `my-app.js` as a string:\n\n```js\nvar str = fs.readFileSync('my-app.js', 'utf8');\nvar context = parseContext(str);\n```\n\nResults in:\n\n```js\n[{\n  type: 'comment',\n  begin: 1,\n  end: 3\n},\n{\n  begin: 4,\n  type: 'function',\n  name: 'app',\n  string: 'app()',\n  original: 'var app = function(str) {'\n}]\n```\n\n## Related projects\n\n* [extract-comments](https://github.com/jonschlinkert/extract-comments): Extract code comments from string or from a glob of files.\n* [parse-code-context](https://github.com/jonschlinkert/parse-code-context): Parse code context in a single line of javascript, for functions, variable declarations, methods, prototype… [more](https://github.com/jonschlinkert/parse-code-context)\n* [parse-comments](https://github.com/jonschlinkert/parse-comments): Parse code comments from JavaScript or any language that uses the same format.\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/code-context/issues/new)\n\n## Authors\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 01, 2015._","publish_time":1416403396832,"_cnpm_publish_time":1416403396832,"dist-tags":{"latest":"0.5.3"}}