| 1 |
{ |
| 2 |
"_id": "which-module", |
| 3 |
"_rev": "6-f6ee7fe9f3acd03881ba625a76931bd6", |
| 4 |
"name": "which-module", |
| 5 |
"description": "Find the module object for something that was require()d", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "2.0.0" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"1.0.0": { |
| 11 |
"name": "which-module", |
| 12 |
"version": "1.0.0", |
| 13 |
"description": "Find the module object for something that was require()d", |
| 14 |
"main": "index.js", |
| 15 |
"scripts": { |
| 16 |
"pretest": "standard", |
| 17 |
"test": "nyc ava", |
| 18 |
"coverage": "nyc report --reporter=text-lcov | coveralls", |
| 19 |
"release": "standard-version" |
| 20 |
}, |
| 21 |
"files": [ |
| 22 |
"index.js" |
| 23 |
], |
| 24 |
"repository": { |
| 25 |
"type": "git", |
| 26 |
"url": "git+https://github.com/nexdrew/which-module.git" |
| 27 |
}, |
| 28 |
"keywords": [ |
| 29 |
"which", |
| 30 |
"module", |
| 31 |
"exports", |
| 32 |
"filename", |
| 33 |
"require", |
| 34 |
"reverse", |
| 35 |
"lookup" |
| 36 |
], |
| 37 |
"author": { |
| 38 |
"name": "nexdrew" |
| 39 |
}, |
| 40 |
"license": "ISC", |
| 41 |
"bugs": { |
| 42 |
"url": "https://github.com/nexdrew/which-module/issues" |
| 43 |
}, |
| 44 |
"homepage": "https://github.com/nexdrew/which-module#readme", |
| 45 |
"devDependencies": { |
| 46 |
"ava": "^0.15.2", |
| 47 |
"coveralls": "^2.11.9", |
| 48 |
"nyc": "^6.4.4", |
| 49 |
"standard": "^7.1.2", |
| 50 |
"standard-version": "^2.3.0" |
| 51 |
}, |
| 52 |
"gitHead": "a5b7492798fac7e484fd8812d3d3a1138bb08784", |
| 53 |
"_id": "[email protected]", |
| 54 |
"_shasum": "bba63ca861948994ff307736089e3b96026c2a4f", |
| 55 |
"_from": ".", |
| 56 |
"_npmVersion": "3.8.8", |
| 57 |
"_nodeVersion": "5.11.0", |
| 58 |
"_npmUser": { |
| 59 |
"name": "nexdrew", |
| 60 |
"email": "[email protected]" |
| 61 |
}, |
| 62 |
"dist": { |
| 63 |
"shasum": "bba63ca861948994ff307736089e3b96026c2a4f", |
| 64 |
"tarball": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz" |
| 65 |
}, |
| 66 |
"maintainers": [ |
| 67 |
{ |
| 68 |
"name": "nexdrew", |
| 69 |
"email": "[email protected]" |
| 70 |
} |
| 71 |
], |
| 72 |
"_npmOperationalInternal": { |
| 73 |
"host": "packages-16-east.internal.npmjs.com", |
| 74 |
"tmp": "tmp/which-module-1.0.0.tgz_1465192451403_0.19380306638777256" |
| 75 |
}, |
| 76 |
"directories": {} |
| 77 |
}, |
| 78 |
"2.0.0": { |
| 79 |
"name": "which-module", |
| 80 |
"version": "2.0.0", |
| 81 |
"description": "Find the module object for something that was require()d", |
| 82 |
"main": "index.js", |
| 83 |
"scripts": { |
| 84 |
"pretest": "standard", |
| 85 |
"test": "nyc ava", |
| 86 |
"coverage": "nyc report --reporter=text-lcov | coveralls", |
| 87 |
"release": "standard-version" |
| 88 |
}, |
| 89 |
"files": [ |
| 90 |
"index.js" |
| 91 |
], |
| 92 |
"repository": { |
| 93 |
"type": "git", |
| 94 |
"url": "git+https://github.com/nexdrew/which-module.git" |
| 95 |
}, |
| 96 |
"keywords": [ |
| 97 |
"which", |
| 98 |
"module", |
| 99 |
"exports", |
| 100 |
"filename", |
| 101 |
"require", |
| 102 |
"reverse", |
| 103 |
"lookup" |
| 104 |
], |
| 105 |
"author": { |
| 106 |
"name": "nexdrew" |
| 107 |
}, |
| 108 |
"license": "ISC", |
| 109 |
"bugs": { |
| 110 |
"url": "https://github.com/nexdrew/which-module/issues" |
| 111 |
}, |
| 112 |
"homepage": "https://github.com/nexdrew/which-module#readme", |
| 113 |
"devDependencies": { |
| 114 |
"ava": "^0.19.1", |
| 115 |
"coveralls": "^2.13.1", |
| 116 |
"nyc": "^10.3.0", |
| 117 |
"standard": "^10.0.2", |
| 118 |
"standard-version": "^4.0.0" |
| 119 |
}, |
| 120 |
"gitHead": "7f78f42d0761133263c3947a3b24dde324a467ce", |
| 121 |
"_id": "[email protected]", |
| 122 |
"_shasum": "d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a", |
| 123 |
"_from": ".", |
| 124 |
"_npmVersion": "4.2.0", |
| 125 |
"_nodeVersion": "7.9.0", |
| 126 |
"_npmUser": { |
| 127 |
"name": "nexdrew", |
| 128 |
"email": "[email protected]" |
| 129 |
}, |
| 130 |
"dist": { |
| 131 |
"shasum": "d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a", |
| 132 |
"tarball": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" |
| 133 |
}, |
| 134 |
"maintainers": [ |
| 135 |
{ |
| 136 |
"name": "nexdrew", |
| 137 |
"email": "[email protected]" |
| 138 |
} |
| 139 |
], |
| 140 |
"_npmOperationalInternal": { |
| 141 |
"host": "packages-12-west.internal.npmjs.com", |
| 142 |
"tmp": "tmp/which-module-2.0.0.tgz_1493670259112_0.19386909971944988" |
| 143 |
}, |
| 144 |
"directories": {} |
| 145 |
} |
| 146 |
}, |
| 147 |
"readme": "# which-module\n\n> Find the module object for something that was require()d\n\n[](https://travis-ci.org/nexdrew/which-module)\n[](https://coveralls.io/github/nexdrew/which-module?branch=master)\n[](https://github.com/conventional-changelog/standard-version)\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", |
| 148 |
"maintainers": [ |
| 149 |
{ |
| 150 |
"email": "[email protected]", |
| 151 |
"name": "nexdrew" |
| 152 |
} |
| 153 |
], |
| 154 |
"time": { |
| 155 |
"modified": "2018-01-23T08:55:31.744Z", |
| 156 |
"created": "2016-06-06T05:54:13.093Z", |
| 157 |
"1.0.0": "2016-06-06T05:54:13.093Z", |
| 158 |
"2.0.0": "2017-05-01T20:24:20.945Z" |
| 159 |
}, |
| 160 |
"homepage": "https://github.com/nexdrew/which-module#readme", |
| 161 |
"keywords": [ |
| 162 |
"which", |
| 163 |
"module", |
| 164 |
"exports", |
| 165 |
"filename", |
| 166 |
"require", |
| 167 |
"reverse", |
| 168 |
"lookup" |
| 169 |
], |
| 170 |
"repository": { |
| 171 |
"type": "git", |
| 172 |
"url": "git+https://github.com/nexdrew/which-module.git" |
| 173 |
}, |
| 174 |
"author": { |
| 175 |
"name": "nexdrew" |
| 176 |
}, |
| 177 |
"bugs": { |
| 178 |
"url": "https://github.com/nexdrew/which-module/issues" |
| 179 |
}, |
| 180 |
"license": "ISC", |
| 181 |
"readmeFilename": "README.md", |
| 182 |
"users": { |
| 183 |
"zhenguo.zhao": true, |
| 184 |
"shuoshubao": true, |
| 185 |
"losymear": true |
| 186 |
}, |
| 187 |
"_attachments": {} |
| 188 |
} |