{"_id":"which-module","_rev":"13-211d713aef10753c07ec077b9f2ea816","name":"which-module","description":"Find the module object for something that was require()d","dist-tags":{"latest":"2.0.1","rc":"2.0.1-rc1"},"versions":{"1.0.0":{"name":"which-module","version":"1.0.0","description":"Find the module object for something that was require()d","main":"index.js","scripts":{"pretest":"standard","test":"nyc ava","coverage":"nyc report --reporter=text-lcov | coveralls","release":"standard-version"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/nexdrew/which-module.git"},"keywords":["which","module","exports","filename","require","reverse","lookup"],"author":{"name":"nexdrew"},"license":"ISC","bugs":{"url":"https://github.com/nexdrew/which-module/issues"},"homepage":"https://github.com/nexdrew/which-module#readme","devDependencies":{"ava":"^0.15.2","coveralls":"^2.11.9","nyc":"^6.4.4","standard":"^7.1.2","standard-version":"^2.3.0"},"gitHead":"a5b7492798fac7e484fd8812d3d3a1138bb08784","_id":"which-module@1.0.0","_shasum":"bba63ca861948994ff307736089e3b96026c2a4f","_from":".","_npmVersion":"3.8.8","_nodeVersion":"5.11.0","_npmUser":{"name":"nexdrew","email":"andrew@npmjs.com"},"dist":{"shasum":"bba63ca861948994ff307736089e3b96026c2a4f","tarball":"https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz","integrity":"sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGe59QCjSKbf3kcb8Maw1++jI6SzQhGLKiwdx6IGPX5PAiAv2F7knXrwajJjIgQxcoOHg2+GcSotAwgdyfT4NVhg7A=="}]},"maintainers":[{"name":"nexdrew","email":"andrew@npmjs.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/which-module-1.0.0.tgz_1465192451403_0.19380306638777256"},"directories":{}},"2.0.0":{"name":"which-module","version":"2.0.0","description":"Find the module object for something that was require()d","main":"index.js","scripts":{"pretest":"standard","test":"nyc ava","coverage":"nyc report --reporter=text-lcov | coveralls","release":"standard-version"},"files":["index.js"],"repository":{"type":"git","url":"git+https://github.com/nexdrew/which-module.git"},"keywords":["which","module","exports","filename","require","reverse","lookup"],"author":{"name":"nexdrew"},"license":"ISC","bugs":{"url":"https://github.com/nexdrew/which-module/issues"},"homepage":"https://github.com/nexdrew/which-module#readme","devDependencies":{"ava":"^0.19.1","coveralls":"^2.13.1","nyc":"^10.3.0","standard":"^10.0.2","standard-version":"^4.0.0"},"gitHead":"7f78f42d0761133263c3947a3b24dde324a467ce","_id":"which-module@2.0.0","_shasum":"d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"nexdrew","email":"andrew@npmjs.com"},"dist":{"shasum":"d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a","tarball":"https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz","integrity":"sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC53OPKZYZEE0kq+DSThbHCGmj9pK3ydC0qIfmE6vmSkQIhAMuI0FnrJwWYGDqZGh7/upXLNzuN3E3Zj872XxGix75U"}]},"maintainers":[{"name":"nexdrew","email":"andrew@npmjs.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/which-module-2.0.0.tgz_1493670259112_0.19386909971944988"},"directories":{}},"2.0.1-rc1":{"name":"which-module","version":"2.0.1-rc1","description":"Find the module object for something that was require()d","main":"index.js","scripts":{"pretest":"standard","test":"nyc ava","coverage":"nyc report --reporter=text-lcov | coveralls","release":"standard-version"},"repository":{"type":"git","url":"git+https://github.com/nexdrew/which-module.git"},"keywords":["which","module","exports","filename","require","reverse","lookup"],"author":{"name":"nexdrew"},"license":"ISC","bugs":{"url":"https://github.com/nexdrew/which-module/issues"},"homepage":"https://github.com/nexdrew/which-module#readme","devDependencies":{"ava":"^2.0.0","coveralls":"^3.0.3","nyc":"^14.0.0","standard":"^14.0.0","standard-version":"^7.0.0"},"readme":"# which-module\n\n> Find the module object for something that was require()d\n\n[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module)\n[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master)\n[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)\n[![Greenkeeper badge](https://badges.greenkeeper.io/nexdrew/which-module.svg)](https://greenkeeper.io/)\n\nFind the `module` object in `require.cache` for something that was `require()`d\nor `import`ed - essentially a reverse `require()` lookup.\n\nUseful for libs that want to e.g. lookup a filename for a module or submodule\nthat it did not `require()` itself.\n\n## Install and Usage\n\n```\nnpm install --save which-module\n```\n\n```js\nconst whichModule = require('which-module')\n\nconsole.log(whichModule(require('something')))\n// Module {\n//   id: '/path/to/project/node_modules/something/index.js',\n//   exports: [Function],\n//   parent: ...,\n//   filename: '/path/to/project/node_modules/something/index.js',\n//   loaded: true,\n//   children: [],\n//   paths: [ '/path/to/project/node_modules/something/node_modules',\n//            '/path/to/project/node_modules',\n//            '/path/to/node_modules',\n//            '/path/node_modules',\n//            '/node_modules' ] }\n```\n\n## API\n\n### `whichModule(exported)`\n\nReturn the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object),\nif any, that represents the given argument in the `require.cache`.\n\n`exported` can be anything that was previously `require()`d or `import`ed as a\nmodule, submodule, or dependency - which means `exported` is identical to the\n`module.exports` returned by this method.\n\nIf `exported` did not come from the `exports` of a `module` in `require.cache`,\nthen this method returns `null`.\n\n## License\n\nISC © Contributors\n\n[opensourceregistry_package_id]: # (458260416784685e5ef3091fee54001785dd4360406aa3000315ff256eef6878)\n","readmeFilename":"README.md","gitHead":"cd3fe4c27b0a0621fa81a51651b421e32b8aff8b","_id":"which-module@2.0.1-rc1","_nodeVersion":"19.9.0","_npmVersion":"9.6.3","dist":{"integrity":"sha512-ZbVE8B1GVW5L5W8/ZbvZL59pUxyx6118qz+bqhS4YSfHQKPErVWNyYTrQAar9MXLEm9xrcq9r1kkE6AWS/MoXw==","shasum":"013afcde6b5c2ddb1e0616e14e2bd14d8bdb1ff4","tarball":"https://registry.npmjs.org/which-module/-/which-module-2.0.1-rc1.tgz","fileCount":4,"unpackedSize":4040,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcrM/YirSjs7Rpb3GPRhkaWdVovsoxOcGVEiVNTI9W+gIhAKh5P5zk9Bgh1cia53VKP5vQ+GD/iNXRaf7ZeECHMrBR"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQp6kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqP4Q//XBc9h3XqZrWdkk9KFbEwgUSiodEwzsJ3THXnqAT65M/Jiv+4\r\nObO4HXI8AlSR7W9nWUI5r8Z97P8+5qrh2EauCokwibgLfCZHTyMCRCyL5qDJ\r\nINbKTzzn32RARQn/AunBTisIa3j/d2y2m/2VDmzbHur9u3QT25UxcvkJiXo+\r\n6T7VSw7bB+D1hYkejznHpGs5n2yr9sBD6OERA7NU2Oaf+W3IRSQfmsvc4H26\r\nWeztVuew5kBQvU3YQwUP//2T20QfwDD44hBd/GDlmO9dv9KCDzllbSuvF1QR\r\nVXB6eWhrkj5CGqZHR+Lt8bBdYgWPWGht0fNmSOknF7MFaxLb0TiKrEdfWnbe\r\nx9aCApTwQdjDOsT8iqewkNtMnHnBltMhSNunxR/jdBmlVAv5GkiohkxT2+ux\r\nrn0k8E7bgvBvWZFS1AhAd+jh4mEELI3aYqOm5CxpYJQz6ocekcELsT0TXj2B\r\nDb50lD/mZLbphsB+lMSOOwFRuixu4OiZ2rYxeLZYtUCOBGVKuvMOjzGgRUYC\r\n9rpnlKg593d8vpb/ooB9bQ/w8sT34Q7SqdON++2E5el7bDCQXfGLqo8/hQDz\r\nSkpUgyNz9NKzZDSTksgLh9DNAA8bmcoTXFQhx5OxY1VCjXPBH4dWZSPIChY2\r\nzAZviBddr+qjBtDXZNxyNw66+7IYSTfIDUQ=\r\n=w8KK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"directories":{},"maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/which-module_2.0.1-rc1_1682087588516_0.06219480335017713"},"_hasShrinkwrap":false},"2.0.1":{"name":"which-module","version":"2.0.1","description":"Find the module object for something that was require()d","main":"index.js","scripts":{"pretest":"standard","test":"nyc ava","coverage":"nyc report --reporter=text-lcov | coveralls","release":"standard-version"},"repository":{"type":"git","url":"git+https://github.com/nexdrew/which-module.git"},"keywords":["which","module","exports","filename","require","reverse","lookup"],"author":{"name":"nexdrew"},"license":"ISC","bugs":{"url":"https://github.com/nexdrew/which-module/issues"},"homepage":"https://github.com/nexdrew/which-module#readme","devDependencies":{"ava":"^2.0.0","coveralls":"^3.0.3","nyc":"^14.0.0","standard":"^14.0.0","standard-version":"^7.0.0"},"gitHead":"9dcb8cc3d4c46e97209894a6c36ee7a352d6f97e","_id":"which-module@2.0.1","_nodeVersion":"19.9.0","_npmVersion":"9.6.3","dist":{"integrity":"sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==","shasum":"776b1fe35d90aebe99e8ac15eb24093389a4a409","tarball":"https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz","fileCount":4,"unpackedSize":4036,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt1eMQOdy7eNYVQfHNg0qwxUJFHB8b8e8u++qutP0ttwIgelQvk+MvBQuzu9ne/tMCAhEqmJefTzo+REoI+aN0QLc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkQqAMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTmA//duC+tI4EnTjTXS2r4u9TBE2Y3cMXIoX9kDQN8Jk3ifASkE0k\r\n4YseoaVL5bUIqhmFkcnKy9lJ3kViy7ot3XbBM82VgCMfmu7gwYcMPTDKc7l4\r\n9kaBVeY07FNZbRNJw0HdBhJgweOBmRVeH0rSwBESNsnpgwLP8vPwl95qnfhp\r\njy4CL/H7iaWHJ64LXNyuGJC7HOzJWzXroI/BvXRsrVJ5E+rZOsoFSNVJ6mfL\r\nOJ3JMj7FtuStw6n441So3HQ9k1Z2zxmhtKs5vQoFMf/xWyRt6hGOFQAcr3CC\r\nC6tpjRHWA2aMj7tgcev27JRqio99YrEBqaCLAMzffObAlImCJMM40umUojBC\r\nT4Efi630QBIVoWDVRh5mf/ZOz9u3pJAi383DqHBp836wmzqtyYy9cpzrZJFG\r\nqCDZHgIhRasJpkwmovKT9x7X/0UvbBf5A5iVVqRphg0MLeXXBksh5IDXUHc/\r\nu8GhX+mJ88cNPq3aZQsxFuTQXpo21HW4Ma9xZinzoSZx7SRTpqnEu5Q6tvGX\r\nvq6SmSYkdyeSrYGzTq5HfWuxdvHBFZRMllr1rk96v8xvGg2ru8X4YM/ZOZ9B\r\nd0xTKe6Ej0LT1ex2x21N7Y0/d/MxY9yvC8Wo7xnpM2I4EmGi4foA87zocY8I\r\nj5febFm2tX5QTq46CoZzQBwX2rs9UninAvM=\r\n=8uTB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"directories":{},"maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/which-module_2.0.1_1682087948327_0.6762169430729617"},"_hasShrinkwrap":false}},"readme":"# which-module\n\n> Find the module object for something that was require()d\n\n[![Build Status](https://travis-ci.org/nexdrew/which-module.svg?branch=master)](https://travis-ci.org/nexdrew/which-module)\n[![Coverage Status](https://coveralls.io/repos/github/nexdrew/which-module/badge.svg?branch=master)](https://coveralls.io/github/nexdrew/which-module?branch=master)\n[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version)\n[![Greenkeeper badge](https://badges.greenkeeper.io/nexdrew/which-module.svg)](https://greenkeeper.io/)\n\nFind the `module` object in `require.cache` for something that was `require()`d\nor `import`ed - essentially a reverse `require()` lookup.\n\nUseful for libs that want to e.g. lookup a filename for a module or submodule\nthat it did not `require()` itself.\n\n## Install and Usage\n\n```\nnpm install --save which-module\n```\n\n```js\nconst whichModule = require('which-module')\n\nconsole.log(whichModule(require('something')))\n// Module {\n//   id: '/path/to/project/node_modules/something/index.js',\n//   exports: [Function],\n//   parent: ...,\n//   filename: '/path/to/project/node_modules/something/index.js',\n//   loaded: true,\n//   children: [],\n//   paths: [ '/path/to/project/node_modules/something/node_modules',\n//            '/path/to/project/node_modules',\n//            '/path/to/node_modules',\n//            '/path/node_modules',\n//            '/node_modules' ] }\n```\n\n## API\n\n### `whichModule(exported)`\n\nReturn the [`module` object](https://nodejs.org/api/modules.html#modules_the_module_object),\nif any, that represents the given argument in the `require.cache`.\n\n`exported` can be anything that was previously `require()`d or `import`ed as a\nmodule, submodule, or dependency - which means `exported` is identical to the\n`module.exports` returned by this method.\n\nIf `exported` did not come from the `exports` of a `module` in `require.cache`,\nthen this method returns `null`.\n\n## License\n\nISC © Contributors\n\n[opensourceregistry_package_id]: # (458260416784685e5ef3091fee54001785dd4360406aa3000315ff256eef6878)\n","maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"}],"time":{"modified":"2023-07-23T04:47:01.895Z","created":"2016-06-06T05:54:13.093Z","1.0.0":"2016-06-06T05:54:13.093Z","2.0.0":"2017-05-01T20:24:20.945Z","2.0.1-rc1":"2023-04-21T14:33:08.687Z","2.0.1":"2023-04-21T14:39:08.508Z"},"homepage":"https://github.com/nexdrew/which-module#readme","keywords":["which","module","exports","filename","require","reverse","lookup"],"repository":{"type":"git","url":"git+https://github.com/nexdrew/which-module.git"},"author":{"name":"nexdrew"},"bugs":{"url":"https://github.com/nexdrew/which-module/issues"},"license":"ISC","readmeFilename":"README.md","users":{"zhenguo.zhao":true,"losymear":true,"flumpus-dev":true}}