{"name":"detective-cjs","version":"3.1.0","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","engines":{"node":">= 6.0"},"devDependencies":{"jscs":"^3.0.7","jscs-preset-mrjoelkemp":"~2.0.0","mocha":"^5.2.0","sinon":"^6.1.5"},"dependencies":{"ast-module-types":"^2.4.0","node-source-walk":"^4.0.0"},"gitHead":"ecbbac6718887cb0c1a998f3d49b46500958fe30","_id":"detective-cjs@3.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"dist":{"integrity":"sha512-lb74kKVuOAy6zwCGM1ImSn9JBiTkddxbG6f6RDvsBoKiL5XrtcGkgfVXujLVLIyOzrLOtXsOh4pNKJMKakGkqg==","shasum":"493c1be2c74af1566f5c0902d5ba4c4a2fee1d3c","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-3.1.0.tgz","fileCount":3,"unpackedSize":2923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqlpcCRA9TVsSAnZWagAAej8QAKK8O5RPZCl9JgytbGJQ\nq1UupjdP2vy8fM5mS/565G3y3489wmZTR5qh140d6LIqqC7uWhWCMroTYlfq\nm+/dLfX6zXkSf8J2jnBouGx8FyiWyymCU63hJ1Z536ZKvm79FoyIxNwpQ0M3\nKkrUXXoduCKvw4rRmwqs/fRcXSBHazK7GLiiLP79GEIUek3dtKLC5X/GPrTl\n58tFhSp+CxbmLQrkmbu9OX2UB9Dm2upSdhq5Ydq8O1KMQjLsuQcLZM5tNbl4\n5tq7HL51Oz5vGIqp5BwaFatQtnqZqKcKS/k/oK1JSSxo0E9dw6vMUPcQXEO0\nSgF5URdDNVkhmtiMC8iv+rkJypJPOGAduK75gzOK8bSPpydQjJ9LeS436g/e\naY99qTyi10RHfvI1DGg2bWjCWqPsafJ852rdUBs87hj+8Lo3lYNXgBrSQ5h/\n8/SAMYmeYWK4Urm188v4wvZP2CaO4yqZ1ts96SvekcKhyW+A/vGMbB1R2QXo\nl7wbEp3AFtmEr748tv0GdTbeZsOQgUTRNYn9E1Hw9gYVA4hspjkrR6/yU/Pc\nsboWljAFGPpXUnZu7620Nkaj54HB4NC9I7V/GC/Q+YqCYNSfox7SlansMtjh\nWsFYkpafzoV7956pLXqohnlDBm6UuGnpiaAs9kmA/bO6kvbiA7/j+LdK/8Rv\n84Jb\r\n=zFU8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH82AcF/zb3V8hdXgpVqQeR2s9bOwSGFq+8H/JtjlYF8AiEAgjLSyFyA2xBpCvXAXQVJvJZXrymJek5ifNap3w1xlEM="}],"size":1340,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-3.1.0.tgz"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_3.1.0_1537890907445_0.26029081076631555"},"_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":1537890907616,"_cnpm_publish_time":1537890907616,"dist-tags":{"latest":"7.0.0"}}