forked from enviPath/enviPy
Current Dev State
This commit is contained in:
6
static/js/ketcher2/node_modules/caller-path/index.js
generated
vendored
Normal file
6
static/js/ketcher2/node_modules/caller-path/index.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
'use strict';
|
||||
var callsites = require('callsites');
|
||||
|
||||
module.exports = function () {
|
||||
return callsites()[2].getFileName();
|
||||
};
|
||||
73
static/js/ketcher2/node_modules/caller-path/package.json
generated
vendored
Normal file
73
static/js/ketcher2/node_modules/caller-path/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"_from": "caller-path@^0.1.0",
|
||||
"_id": "caller-path@0.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=",
|
||||
"_location": "/caller-path",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "caller-path@^0.1.0",
|
||||
"name": "caller-path",
|
||||
"escapedName": "caller-path",
|
||||
"rawSpec": "^0.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/require-uncached"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
|
||||
"_shasum": "94085ef63581ecd3daa92444a8fe94e82577751f",
|
||||
"_spec": "caller-path@^0.1.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/require-uncached",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/caller-path/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"callsites": "^0.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Get the path of the caller module",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/caller-path#readme",
|
||||
"keywords": [
|
||||
"caller",
|
||||
"calling",
|
||||
"module",
|
||||
"path",
|
||||
"parent",
|
||||
"callsites",
|
||||
"callsite",
|
||||
"stacktrace",
|
||||
"stack",
|
||||
"trace",
|
||||
"function",
|
||||
"file"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "caller-path",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/caller-path.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.1.0"
|
||||
}
|
||||
36
static/js/ketcher2/node_modules/caller-path/readme.md
generated
vendored
Normal file
36
static/js/ketcher2/node_modules/caller-path/readme.md
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
# caller-path [](https://travis-ci.org/sindresorhus/caller-path)
|
||||
|
||||
> Get the path of the caller module
|
||||
|
||||
You can't use [`module.parent`](http://nodejs.org/api/modules.html#modules_module_parent) as modules are cached and it will return the first caller module, not necessarily the current one.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save caller-path
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// foo.js
|
||||
var callerPath = require('caller-path');
|
||||
|
||||
module.exports = function () {
|
||||
console.log(callerPath());
|
||||
//=> /Users/sindresorhus/dev/unicorn/bar.js
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
// bar.js
|
||||
var foo = require('./foo');
|
||||
foo();
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user