{"name":"detective-cjs","version":"3.0.0","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":"~2.4.0","jscs-preset-mrjoelkemp":"~1.0.0","mocha":"^5.2.0","sinon":"^6.1.5"},"dependencies":{"ast-module-types":"^2.3.2","node-source-walk":"^4.0.0"},"gitHead":"8b9fe3eef057da684c817079a4aeedf6d7a8d6c5","_id":"detective-cjs@3.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"},"dist":{"integrity":"sha512-puD0jZafqZ6wkAYSRtfXCrx57/QOxfIPozL8tpnltRaXb6T2XBP8HseUKLpCcJ4xFu5gEeu5RSZTIcVkT/MrQw==","shasum":"14200b5ed2bc6421d4f2e92b129d39db40fa2d74","tarball":"http://registry-npm.ywwl.com/detective-cjs/download/detective-cjs-3.0.0.tgz","fileCount":3,"unpackedSize":2674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjWfvCRA9TVsSAnZWagAAh0EP/jqtWlSqj3kB6Ca4c5ng\nk0PibRhv63lkvly+O+BzOiNjD/jQfiFpLG62H58zGdFMHXC+JMTgaoUQFZ56\nhPTQhZLHiZubOYYJhYoxqNwOVDgNth9KvrIiXJPRO7DPoRpe5JYyjN6FX1u0\nPUH/8biDIUrU/yYHPmE4fnuBrh2YyWq35Mu1zsCjQNl3nBBAQ/xD6d/NgKPd\nZaxEdnhj+Zr7Gkmo1Tu2/d2yJ89DGL4B73y+1Tdv5pX3WV/xim8lbSXZEW+r\n4WI/RFn3ZwOLkfqJkCrLvQ5Cn16hWasA+1yw696GuT1fSFBqkRR4RAMD6zqA\nEk44DiT7RFay4N/WF9QrDTjwRZzZ7fGIwpaK40rpTK7quXwMUESacAngImQt\nXbGoEWgZmaGq/2FaNd5G/ngLksuM1AHn2OAGBXbP825tGc5laErn44Ozg9QV\nSFCgOvJRbJyh2o8qIL5KqEoVUC981NlRbFDvEUTYlzNaKa94G93aWCKdv1bp\n0P6RSSoSTup9dBkKEuhr0c8w7rU3IUWsjLNjZxv8MU6u5ksBLpJj8rp1zXDZ\nXLsgsKdM4hB2Z4xySeaYSepv+HbTgZKYQIAcDMtCL/jncpx64/svLdEiszJv\n0EY0UivcFuhOOArgGMFydrHyM2EjmMnYG1YDrbQooPxU0nwf1gsHcV1dhxd6\nxDcZ\r\n=/AiM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3VqUBofSBHjTM8Zr/bcHKXBBkxFFOBAXN4aQsCwxoYAiEAgdQwOpSLLcsYHO2m00vpQJBZyKxrmieGTnZ7UbOYb0A="}],"size":1296,"noattachment":false,"key":"/detective-cjs/-/detective-cjs-3.0.0.tgz"},"maintainers":[{"name":"mrjoelkemp","email":"joel@mrjoelkemp.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detective-cjs_3.0.0_1535993839178_0.0197366041742415"},"_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":1535993839354,"_cnpm_publish_time":1535993839354,"dist-tags":{"latest":"7.0.0"}}