{"name":"detective-cjs","version":"4.1.0","description":"Get the dependencies of a CommonJS module by traversing its AST","main":"index.js","scripts":{"lint":"eslint index.js \"test/*.js\"","fix":"npm run lint -- --fix","mocha":"mocha","test":"npm run lint && npm run mocha","test:ci":"c8 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":">=12"},"dependencies":{"ast-module-types":"^4.0.0","node-source-walk":"^5.0.1"},"devDependencies":{"c8":"^7.13.0","eslint":"^8.36.0","mocha":"^9.2.2"},"gitHead":"4b2e393f42dc2d83d6869aac64e1c86cad62c42f","_id":"detective-cjs@4.1.0","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-QxzMwt5MfPLwS7mG30zvnmOvHLx5vyVvjsAV6gQOyuMoBR5G1DhS1eJZ4P10AlH+HSnk93mTcrg3l39+24XCtg==","shasum":"56b1558ca0910933c7fc47c740b957f0280ff302","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-4.1.0.tgz","fileCount":4,"unpackedSize":4467,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBPrycxnvlZpFFE3bGsOFjJefK+US1dfxsnxVmN8w/NCAiBlt8Xaz05FCz1ysDUwMJiraDoxCMwkb9YJArRg3JcFww=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFsBLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmFA/+OWHbfqRMmUWMPvEkgi9ZZQgSkZ/KmvUH+chLz3UNkPoDpqvB\r\ncinINqcj71cjXHLONqjQyObuegTZ0aJibKuDJSnJLNYabxVHds4cc0N8d5P2\r\no5ffE22olJ3gWaMTwELKBsPXRi7c74y+NA3x8nt4Eqe4DdpCrL00Ot9bg67r\r\nd2PF/XI4UqGu8R4CYJm3leKUdqv6jbkqKS+RBzTTJzxWLUENkUSYvZqc0OFl\r\nLj73Yb+WwaY7jlIkL/nadOtnmDx5GkInJIBhn+WEK6pY4gQy0KVJjQSSSfZn\r\nBykAGvwpT90D/V+GCqDwXVHct5FPYVnTFVnugsESB+VBofVvLJ2HI3lj6OkR\r\nSkRsG4r/WTv446TVAEGZ0U7dSqDgoXXFRp44TjDPwSnDAcjMN4RHP2RcdyK1\r\nJ0DwmKFyK3MIgK+mAfmBMliGZW3ThD6QahkfevD3+N12O9IpzHi65d+r22FX\r\nPug2vnaMGCqN049N9189hwGCrYNFDhMeGPso9z/AKgAPJg/fvFih01oC19W6\r\nvm52BnCDnDl30oydZESLwGHYX6TG+LQPO8r5Ur2uWYG9n9jBVrIiKMT3VGBU\r\nl435tCUeLEDFGhPBRHn+BPWCXVawJ9oyEjUOL1MBKBNVAKtj1ruyjdZ+YDTI\r\noI1bUASd/8qkbqxh8S4aEO73gaawmBodYj4=\r\n=1j79\r\n-----END PGP SIGNATURE-----\r\n","size":2135,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-4.1.0.tgz"},"_npmUser":{"name":"xhmikosr","email":"xhmikosr@gmail.com"},"directories":{},"maintainers":[{"name":"pahen","email":"patrik.henningsson@gmail.com"},{"name":"xhmikosr","email":"xhmikosr@gmail.com"},{"name":"mrjoelkemp","email":"mrjoelkemp@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_4.1.0_1679212619226_0.14780888921860313"},"_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":1679212619376,"_cnpm_publish_time":1679212619376,"dist-tags":{"latest":"7.0.0"}}