{"name":"code-context","description":"Parse a string of javascript to determine the context for functions, variables and comments based on the code that follows.","version":"0.4.1","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"}],"index":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","lint":"deps -e test,fixtures && verb"},"devDependencies":{"fs-utils":"^0.4.3","mocha":"*","should":"^4.0.4"},"dependencies":{"parse-code-context":"^0.1.3"},"keywords":["code","comment","context","declaration","docs","documentation","expression","extract","function","javascript","js","method","parse","property","prototype","statement"],"gitHead":"f53ca4beba60531fd59ab1638fc688245f4fe458","_id":"code-context@0.4.1","_shasum":"d7f4d1a40e22e1a83a77324e9815f39e63ecea31","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"},{"name":"doowb","email":"brian.woodward@gmail.com"}],"dist":{"shasum":"d7f4d1a40e22e1a83a77324e9815f39e63ecea31","tarball":"http://registry-npm.ywwl.com/code-context/download/code-context-0.4.1.tgz","integrity":"sha512-D7MsPWn3ZIm02c8Pk77VorakTtLD7uHm2Ia+tcJi/Eu2jTkypJHwFT90CoRKFmnScobpVXt4B9cWMC0carn/lA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFt/qBG4JgA9nBCDP8gCJbjwYu4l//bRN7eJf8/gamOPAiEAhIkgOZJg9hRprvpb1d7uajgkUBUiFWdL0TjG7jPYasE="}],"size":21771,"noattachment":false,"key":"/code-context/-/code-context-0.4.1.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":1423855246308,"_cnpm_publish_time":1423855246308,"dist-tags":{"latest":"0.5.3"}}