get-caller-file

WebJar for get-caller-file

Лицензия

Лицензия

ISC
Группа

Группа

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

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

get-caller-file
Последняя версия

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

2.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

get-caller-file
WebJar for get-caller-file
Ссылка на сайт

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

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

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

https://github.com/stefanpenner/get-caller-file

Скачать get-caller-file

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

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

Зависимости

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

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

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

get-caller-file

Build Status Build status

This is a utility, which allows a function to figure out from which file it was invoked. It does so by inspecting v8's stack trace at the time it is invoked.

Inspired by http://stackoverflow.com/questions/13227489

note: this relies on Node/V8 specific APIs, as such other runtimes may not work

Installation

yarn add get-caller-file

Usage

Given:

// ./foo.js
const getCallerFile = require('get-caller-file');

module.exports = function() {
  return getCallerFile(); // figures out who called it
};
// index.js
const foo = require('./foo');

foo() // => /full/path/to/this/file/index.js

Options:

  • getCallerFile(position = 2): where position is stack frame whos fileName we want.

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

Версия
2.0.5
2.0.1
1.0.3
1.0.2