{"name":"detective-cjs","version":"3.1.3","description":"Get the dependencies of a CommonJS module by traversing its AST","main":"index.js","scripts":{"lint":"eslint index.js \"test/*.js\"","mocha":"mocha","test":"npm run lint && npm run mocha"},"repository":{"type":"git","url":"git+https://github.com/dependents/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/dependents/node-detective-cjs/issues"},"homepage":"https://github.com/dependents/node-detective-cjs","engines":{"node":">=6.0"},"dependencies":{"ast-module-types":"^3.0.0","node-source-walk":"^4.0.0"},"devDependencies":{"eslint":"^5.16.0","mocha":"^6.2.3"},"gitHead":"d803e2f1010059e7f91c910d5de0fb92865efd5d","_id":"detective-cjs@3.1.3","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-ljs7P0Yj9MK64B7G0eNl0ThWSYjhAaSYy+fQcpzaKalYl/UoQBOzOeLCSFEY1qEBhziZ3w7l46KG/nH+s+L7BQ==","shasum":"50e107d67b37f459b0ec02966ceb7e20a73f268b","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-3.1.3.tgz","fileCount":4,"unpackedSize":4287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFNv8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq09A//f72zhoNiU+hkN/QBQiPMW5cDENLWmpPbTJK8mQYGDm6rNcEY\r\nMofoZ1HgbNUUrpRxdRDWLpUGTQGRPt6tX7d7vQF+i98jaG7QFlt4YIE8Z4Tu\r\nXHN2NUIkWHEvh63ThwitYl2fNiDeF/AbZS+6EZZhfmtdYkJM8JVOYEmFOV3O\r\np6XeLBt7KSF7iHOHLMVXun2OP+n60Ln7PkCgs5GLmLV9kN/QLAh9ZG8GQ5et\r\nD8G9QFeXcDS2Z2M1UHKvSarF/DKxJ5QjRZh0LsBed2v6+x1NEuUVNmPpVuiD\r\nv2l/Bsa6qcD6DezWvOZAvv07+pWgsJ1th3Oi5yrGHlbOqys5yLuajJK9IKz/\r\nMungPxJxW6iN8VMIoFof90PD/43eA9uS6GZqrVoy0zgEKVsm/W9KvD7esniK\r\nmhUxelq/cMvMTMSWk3z1IgfmDSRIEKUZ0tkNyWYb//BpeIPT3AOh9NlpaI26\r\nc1rD/0C/ZglcIkIoK4kL7k2uaPlilrXcdJ1BnuxuhWAD/m6a+Ev11GH9MBn6\r\nI6LG6TGGevXH92/CMp721uoIxZa/DFwTm7T+v6GWoA6CWoDXLXQLnzSQlAmA\r\nG5OCihCe9OnTrNNzL2w63673g8YUqqU7+lWZ/Xk/2Cer1Wn34qfuiApx3kbT\r\nxbe9MqbdWxlxwn3ktXm1RavpENKxgIC9Ffc=\r\n=LHC0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCieVD7NLMvIvJdchciv02a5ebA/TyZiZFDK8OnEvnQdwIgOwd1XM1QADRWcCjQdgjXUJ0rN4tdNZj75ou2YwcGAXk="}],"size":2049,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-3.1.3.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_3.1.3_1645534204532_0.0181498808598608"},"_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":1645534204691,"_cnpm_publish_time":1645534204691,"dist-tags":{"latest":"7.0.0"}}