which-module

WebJar for which-module

Лицензия

Лицензия

ISC
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

which-module
Последняя версия

Последняя версия

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

which-module
WebJar for which-module
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/nexdrew/which-module

Скачать which-module

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/which-module/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>which-module</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/which-module/
implementation 'org.webjars.npm:which-module:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/which-module/
implementation ("org.webjars.npm:which-module:2.0.0")
'org.webjars.npm:which-module:jar:2.0.0'
<dependency org="org.webjars.npm" name="which-module" rev="2.0.0">
  <artifact name="which-module" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='which-module', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "which-module" % "2.0.0"
[org.webjars.npm/which-module "2.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

which-module

Find the module object for something that was require()d

Build Status Coverage Status Standard Version Greenkeeper badge

Find the module object in require.cache for something that was require()d or imported - essentially a reverse require() lookup.

Useful for libs that want to e.g. lookup a filename for a module or submodule that it did not require() itself.

Install and Usage

npm install --save which-module
const whichModule = require('which-module')

console.log(whichModule(require('something')))
// Module {
//   id: '/path/to/project/node_modules/something/index.js',
//   exports: [Function],
//   parent: ...,
//   filename: '/path/to/project/node_modules/something/index.js',
//   loaded: true,
//   children: [],
//   paths: [ '/path/to/project/node_modules/something/node_modules',
//            '/path/to/project/node_modules',
//            '/path/to/node_modules',
//            '/path/node_modules',
//            '/node_modules' ] }

API

whichModule(exported)

Return the module object, if any, that represents the given argument in the require.cache.

exported can be anything that was previously require()d or imported as a module, submodule, or dependency - which means exported is identical to the module.exports returned by this method.

If exported did not come from the exports of a module in require.cache, then this method returns null.

License

ISC © Contributors

Версии библиотеки

Версия
2.0.0
1.0.0