{"name":"detective-cjs","version":"2.0.1","description":"Get the dependencies of a CommonJS module by traversing its AST","main":"index.js","scripts":{"test":"jscs index.js test && mocha test/test.js"},"repository":{"type":"git","url":"git+https://github.com/mrjoelkemp/node-detective-cjs.git"},"keywords":["detective","commonjs","dependencies","ast","static analysis","cjs","jsx"],"author":{"name":"Joel Kemp","email":"joel@mrjoelkemp.com"},"license":"MIT","bugs":{"url":"https://github.com/mrjoelkemp/node-detective-cjs/issues"},"homepage":"https://github.com/mrjoelkemp/node-detective-cjs","devDependencies":{"jscs":"~2.4.0","jscs-preset-mrjoelkemp":"~1.0.0","mocha":"~2.0.1","sinon":"~1.12.2"},"dependencies":{"ast-module-types":"^2.3.2","node-source-walk":"^3.0.0"},"gitHead":"f020fb473122359bbd7f8754c29880ed9d2b237e","_id":"detective-cjs@2.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"dist":{"integrity":"sha512-N7zolR3HcXuqyIxtx2ER0iJ422AHRoHdxJE4fhCidPQHvXIdYSvq9nt8j3wrT4T4nZlzgpQc9iAubfhqQfGe6w==","shasum":"d721b83a61a37048aa1b72328b409dbf7a55431e","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-2.0.1.tgz","fileCount":3,"unpackedSize":2620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbf08ZCRA9TVsSAnZWagAAk9wP/jHY0p3bBk0zZHtNQ4uX\nION15dsU1JzhRZDXKYTMhxByVmCEbVVLyPTt79GeRv9RKUW2FKSGtcR4O7tF\nwfLNrsmfN/1Z+fJlQGa5wGCEePgxuPowsUACnL+4y5s5EaKg5TYztkJg3o23\ns4MFRyE7Pq4l/4gkOWahD+yQg7nPejfKjkxWHaqcCPkYL6pRqsx8JV3QytBx\n6GER/Zhex4Of0uAJIGxmfXietIB0PUPH+wit14NGo3X06Rh8MEyh58ScZNws\nFyUkI9bcA8G5W4GMqsiNlwABZmgTtguexDabGekqsFhUQRDXoFqZufMDalhs\nvhe5rBREufVXmYXD0qgDMRgtR8GVxqUqh/sJLlHDmqEvkfB9kPTPDolBHwup\nZX9HGPyUHfBeoBs8QQcDdmjmtGTYkLf0B3RD47hwzcyhD8taEbzbYEId9elC\nQMxXG0IWq/PTv6orumZe0+usq/04TLkK56QDArSlskDprQMmrabjdZcvHiz1\np3buPtrBwhxPE7RqXcZStIzGNjGO1UEtrCJIgXh/G/iUeul2FT/+wdehaVeo\nx3An/2yRb8DzVTdhRBdsqn8BhBdSyVEUI+l352069Gn9wqKWAOf5fbELBwRS\nBf4Up4Ku0lcXEKYg6zxZGs4qW9f3eCgBop8jWky4j5qp7+QvOoTfQB5+foNg\n1WnS\r\n=iSxE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjkxrZ6dgUpEaJGT+4MLAelcFd4I2bQrDYpDvZ0bEtpQIgFMlLie28iqZFfs3aWTOPoEVzBtaXOftdU353XMOvDQo="}],"size":1265,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-2.0.1.tgz"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_2.0.1_1535069976620_0.13701800886343207"},"_hasShrinkwrap":false,"readme":"# detective-cjs\n\n[![CI](https://img.shields.io/github/actions/workflow/status/dependents/node-detective-cjs/ci.yml?branch=main&label=CI&logo=github)](https://github.com/dependents/node-detective-cjs/actions/workflows/ci.yml?query=branch%3Amain)\n[![npm version](https://img.shields.io/npm/v/detective-cjs?logo=npm&logoColor=fff)](https://www.npmjs.com/package/detective-cjs)\n[![npm downloads](https://img.shields.io/npm/dm/detective-cjs)](https://www.npmjs.com/package/detective-cjs)\n\n> Get the dependencies of a CommonJS module by traversing its AST\n\n```sh\nnpm install detective-cjs\n```\n\nBut dude, substack already built this: node-detective. Yes, but I needed the capability to reuse an AST\nand this was unlikely to be merged timely. I can also support jsx and other syntactic constructs faster.\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst detective = require('detective-cjs');\n\nconst mySourceCode = fs.readFileSync('myfile.js', 'utf8');\n\n// Pass in a file's content or an AST\nconst dependencies = detective(mySourceCode);\n```\n\n* Supports JSX, ES7, and any other features that [node-source-walk](https://github.com/dependents/node-source-walk) supports.\n\n## License\n\n[MIT](LICENSE)\n","publish_time":1535069976685,"_cnpm_publish_time":1535069976685,"dist-tags":{"latest":"7.0.0"}}