{"name":"detective-cjs","version":"3.1.1","description":"Get the dependencies of a CommonJS module by traversing its AST","main":"index.js","scripts":{"test":"jscs index.js test && mocha test/test.js"},"repository":{"type":"git","url":"git+https://github.com/mrjoelkemp/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/mrjoelkemp/node-detective-cjs/issues"},"homepage":"https://github.com/mrjoelkemp/node-detective-cjs","engines":{"node":">= 6.0"},"devDependencies":{"jscs":"^3.0.7","jscs-preset-mrjoelkemp":"~2.0.0","mocha":"^5.2.0","sinon":"^6.1.5"},"dependencies":{"ast-module-types":"^2.4.0","node-source-walk":"^4.0.0"},"gitHead":"69e754e4f5397c0c467dc96ae91c16e1bba6b2bf","_id":"detective-cjs@3.1.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"dist":{"integrity":"sha512-JQtNTBgFY6h8uT6pgph5QpV3IyxDv+z3qPk/FZRDT9TlFfm5dnRtpH39WtQEr1khqsUxVqXzKjZHpdoQvQbllg==","shasum":"18da3e39a002d2098a1123d45ce1de1b0d9045a0","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-3.1.1.tgz","fileCount":3,"unpackedSize":2982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbtXgvCRA9TVsSAnZWagAAPUIP/3IDq+Rh4roi9N828lz1\n/9SkvPz1BM67fym8ElGznSAazPGiLWUbge2nDsg3xWjiPyS/eNQA5t+Y9MBX\nMTAYvnhXoAKVHokt+kZnJMibthon0M/8mZuN4YVIhMi7tKL5DBFnXI6zY41M\nHAu0ZVWEbvf2szzdVj9FS4bEYVUEfp1FOsZCHS/Ss3JsukMPInwhHK35m3Qg\nAoAPScQHcNMNBbGHerCoVvgUZzZuo+FymeKZiGxANQhfK8cgmzosdexrTROq\nvX61nwzdZU8AboPg3fQzniA2XLMKvU7CSUfaefQsSX901dypwOtnTQQtlAv8\n8ClzrDNeakuLHWyDZXb1uHHFRCq78CjucKWdRITMS4s3+O/Ub62d6kg1MIAy\nA3IesAImoKIHQ8UH0to4ej8j1A+G5uxDeT8fRACDv/kLqg8yesNUmfEoiu2a\n88WaNf/uLwfWwe5IBNXYFM4kTTZ73g4vX0IgZ0gRCIJmeOPfTIWDhFYZqtTi\nD3XnjNXO0E0GLVJkmdPGL1EXYDdvs5fGpCLTd4bBImRiil2lkHFnLv8oC8U7\nv72tQKK2P5c+P+04SSuxqwAAA8MOCHDHAnPkVIur9uzFidJJOI23z72NcKYS\nb3z70fxw2ev9Q2we28BLAvPiBC97iswdQiBJX/SpbY9ZUiz2fisSfB9YcY1G\nuW8W\r\n=E7Y0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAdXH52zr0bnZtfMGKik8NkwqodIQ+i5/rJRTvOPST81AiEA1Hpn4+UKiNmb8TgTkQLEDd/oungCIZqkK2qYDV89Vkc="}],"size":1363,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-3.1.1.tgz"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_3.1.1_1538619438286_0.9769957622360526"},"_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":1538619438497,"_cnpm_publish_time":1538619438497,"dist-tags":{"latest":"7.0.0"}}