{"name":"code-context","description":"Parses the context from a string of javascript to determine the context for functions, variables and comments based on its code.","version":"0.2.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":{"mocha":"*","should":"^4.0.4","verb":">= 0.2.6"},"dependencies":{"line-count":"^0.1.0"},"_id":"code-context@0.2.0","_shasum":"d83f4f353c1d2c919a23124f7904906ef3593bce","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"d83f4f353c1d2c919a23124f7904906ef3593bce","tarball":"http://registry-npm.ywwl.com/code-context/download/code-context-0.2.0.tgz","integrity":"sha512-9vQnk9EMVeIz+QEyW97M00CL/tTstm5bgUcNypZc+/ZcOK4dWAWunZUC5O1Ozq72IparVUY6Cyz81ILzRNiQUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDVYG4p7AufjJf8HbHdIQ/z8Kyun0r1+laHNl9MxJ8qnAiEA8tUl1vy2/JHiVqEcZkTsZGajFW2jMt5CARGHl5dVmMo="}],"size":33009,"noattachment":false,"key":"/code-context/-/code-context-0.2.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":1408945913947,"_cnpm_publish_time":1408945913947,"dist-tags":{"latest":"0.5.3"}}