{"name":"detective-cjs","version":"3.1.2","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":"^2.4.0","node-source-walk":"^4.0.0"},"devDependencies":{"eslint":"^5.16.0","mocha":"^6.2.3"},"gitHead":"a5973270b3934dba1f7ec4c816a68216036edda7","_id":"detective-cjs@3.1.2","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-lEw/irudK033uwdrH7mX5L/knHXps4YtC6OlwN8fZ8j4mPFP6QRkRBHEPgWqk/wVxDdikNGPNBIeI3WRytD+yQ==","shasum":"b6b7ce647946cdefe136a0fff6973ead2f0f5d0d","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-3.1.2.tgz","fileCount":4,"unpackedSize":4266,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiE+GtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIcBAAhwA0oC/dvTvsU7KR5X4dI/zfDvjdJxbdjfZ4QLXvVridBVgh\r\n31tkyjSBUwHBTGdozpyPOBmZTgqf+guNfFNKhpgwo37gzRKJJYwB0whYfyUG\r\neUrzDwQ2ifmLoz+R6eC+Xfaomay4U4uJiO+ALJ3s65TLaIVfqtPmvG1Dt+AJ\r\nHVbrLFHUUZ1jSqfC2Vaa7AKTV1ngH3ImyTXSZpa9iZJiNDymkZi1ceWGmsCe\r\ne3uHbUb49Z7QLofuZMwlgPH//mWUVhYU+hrvUy1SpbgQ2QGx+D/8fB4WGoAN\r\n+6Q4/f4e/FDlPPlQodtcX7QUYeMuFSTPbQpiSlvk++GbBUZtJ0vgP2MhU+EH\r\nSslzE0gdeI/Kk+9o0nGRL9RMLZ1Lti5WuMFQ2XPExS0G9744JwUK/wGqlct2\r\n0BHRGPiVAVdSWLncUNpjYQIm25BaedvoT/+8TkV0LgN7+z43z7Wqi0CGqvI5\r\nPjoUGAAEjWRXqDfmw5sQISGg+7V6RjnFVLQwASauS1Fcm530zgZ4WMUFFtox\r\n8RJKrGouSyRKpgO5v4gT9goZr/MI/E7+V99jyYusU2u00P+4GZa9oCxEq45r\r\n1j8y7n57NN1m9LBa4K4nXX1MzWvgEnTMLy5a8J0UFL4E65YkQizJoNBJKOsa\r\nkb1+At/rla9s9YNTd2opam2wTYijp0iFWeY=\r\n=MnRX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyPrcF3ccuKMSqi1kkaFiJBB75q7HK7W95NhjXsF57TQIgCV7rY0ygzeLePG8aa2UpnPC6IgYBVxXpQQsij1iDrxk="}],"size":2053,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-3.1.2.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.2_1645470124838_0.3397791049722607"},"_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":1645470125096,"_cnpm_publish_time":1645470125096,"dist-tags":{"latest":"7.0.0"}}