{"name":"detective-cjs","version":"5.0.0","description":"Get the dependencies of a CommonJS module by traversing its AST","main":"index.js","scripts":{"lint":"xo","fix":"xo --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":">=14"},"dependencies":{"ast-module-types":"^4.0.0","node-source-walk":"^5.0.1"},"devDependencies":{"c8":"^7.13.0","mocha":"^9.2.2","xo":"^0.54.2"},"xo":{"space":true,"ignores":["test/fixtures/*"],"rules":{"arrow-body-style":"off","capitalized-comments":"off","comma-dangle":["error","never"],"curly":["error","multi-line"],"operator-linebreak":["error","after"],"object-curly-spacing":["error","always"],"space-before-function-paren":["error","never"],"unicorn/prefer-module":"off","unicorn/prefer-node-protocol":"off","unicorn/prefer-top-level-await":"off","unicorn/prevent-abbreviations":"off"}},"gitHead":"b70e7d46f595fbc6820219db5c026b83ae9f14c6","_id":"detective-cjs@5.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-KqRWQ+luVKQL8q+mEZaqPL3JvAyFCx2Q7KVDK/DqJM7+ncWCbH3D3NY3rtGMn4NbCniFI/j6sYF3UB/6E/R7Wg==","shasum":"7b7ae0290e90f4233fe92fb709da726dabb414d2","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-5.0.0.tgz","fileCount":4,"unpackedSize":5152,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBxX7qfTgL2Z5K8yMy085Ijl4jRysuyQVx6dhVS39eBAiEAlGxkUfXvtDcgd7L+9ljkitC0TJP3yWbnE71ox3Ite0w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkVKkFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1ZA/+JUb3I3NtQc0lVtgHnbf9nZ23LEvrvf2Wlhp7N4035TqgpKgI\r\nSZPyBkon+o66rDgD/QvHQCMYkdn0Z9bUK8NRIyAFswstQakucslLrnN721TK\r\nU0KX48Zm6NsGZtbwWlH3BD3LQwQlZXyliLlclmRh1NNqi9LNLmoI+R4J3QVv\r\n4jVLgMR5M+9mmiY1vpHWIGmcE3DlJSNbLuA9w7QaVppceF5ut7TcAotB7W+8\r\n04GgDh0sn4LXWABTk2/fOPYXGw5onXL061Vs3b5cxpRYQ5ICI9Adw3024UKw\r\n8vIuT2/PJZj42rMQg9nA4Y1XJf4RAuIFefT7vA8YDTx2bYfrSxihwFiH1+Eo\r\nqXr/5rf1/ilLy2ZlENNjbDLg0wgtnLL8JuZhZx2ayUkgba02Zlf8kzmrqqWQ\r\n5yeNG9wuWjAqzX1bY5oHYWZAuyXxQelIl3B0ZuwakGSSRvXae7+4lsq16mBr\r\nBukikQ8PcVzz5B3UcUowlWcUxKCr9whZzDn6kkA0g6IbC7ieqcBgehZ9Btec\r\nuPAS1KedJxlr0pQJPqJe4nkpy8STKsD5ejw1ZvQakNREtGcHAkRCLVMyw2V0\r\nT+8ct6WOat5wbw4Mt5sv5XDvsmA3Ln//vRo6lkwghrjcD27BNbHySaASUsEf\r\n8TFYyUOi03DTHMcaJqB5oSsGX8HQ6xHTKTA=\r\n=2rlN\r\n-----END PGP SIGNATURE-----\r\n","size":2361,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-5.0.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_5.0.0_1683269893227_0.15647745091929788"},"_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":1683269893408,"_cnpm_publish_time":1683269893408,"dist-tags":{"latest":"7.0.0"}}