{"name":"detective-cjs","version":"4.0.0","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","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":"^3.0.0","node-source-walk":"^5.0.0"},"devDependencies":{"c8":"^7.11.0","eslint":"^8.10.0","mocha":"^9.2.1"},"gitHead":"8b67a779e2ed41d07cbafa0d2ccc105f9dc19a59","_id":"detective-cjs@4.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-VsD6Yo1+1xgxJWoeDRyut7eqZ8EWaJI70C5eanSAPcBHzenHZx0uhjxaaEfIm0cHII7dBiwU98Orh44bwXN2jg==","shasum":"316e2c7ae14276a5dcfe0c43dc05d8cf9a0e5cf9","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-4.0.0.tgz","fileCount":4,"unpackedSize":4408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiILv2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMsw/9F8G7A5y+ksuIl8UIzM0aaj3sQcaW3y9fmwqg96Wmyx+5yFMr\r\nXSBGzqymTPVlX9k3y3dpgzL7cgbB+wzqN+006+oUJ9WEJX7/hGzk463Pqm5K\r\nhuHCRk/Kc0t57fJYVWJ2uR6ulDFel2johJ2x7xD969e5pt8yXvOkOt9GAW1I\r\nkulIFIM28ktZ5/BJtsO4aMarJaX83UNN2u+iROhT8XGPQAcRjjBEu9exwZxM\r\nly09P98TvmhYoIOInuD7Ggs0f5y7JD4jtpX4kn/A7wHAtvMhA729d8VfcN7K\r\n+5oNqU/kCt328GggTUa6gDBUE6U3gSHgSQ1f4kWjplpdidWM8nKyy+/TG5ZZ\r\niuPvwF3soVTNDU+zmD5W5y9fSFZD2eQAuaZVja2Y92tAuWLu2n/2wLr1s5EY\r\nYbSxF1A5ER+oXqIpBe+N/vB4ILiTrnhgCV0tgY8xA5x2RTGBbhFT0AGEBZ7U\r\nZi/jNP969psRC8Tq1MLnsKLiVJ+x41Wo0tmTTVWA0t6umIADfmzt5CVnezdD\r\naERnV7K31JHYfLUqiXAU5FrLOvUS+ry0l0lx99a8sqBgiid9wtYUxChK6BjM\r\n0HyGf/2Z7orIytE6nXj5vi2wpptooN0Tg3lDjP+JuDgYa7o/07wtQXlfNHty\r\n2Chnq/uV8TJFEdyc1vi6KKcnsuP68xQmTYY=\r\n=DCXo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwWu7RRO13WZYWPTzdwPmUmc4AqOpSWDdMPtyjVoyt/AiAO6UreskzjVLo2yNEXiHVG4YNoX9v1Av7l8BADxYaNDA=="}],"size":2115,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-4.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_4.0.0_1646312438719_0.3502844499732485"},"_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":1646312438871,"_cnpm_publish_time":1646312438871,"dist-tags":{"latest":"7.0.0"}}