aboutsummaryrefslogtreecommitdiff
path: root/node_modules/get-caller-file
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/get-caller-file')
-rw-r--r--node_modules/get-caller-file/LICENSE.md6
-rw-r--r--node_modules/get-caller-file/README.md4
-rw-r--r--node_modules/get-caller-file/index.js20
-rw-r--r--node_modules/get-caller-file/package.json62
4 files changed, 92 insertions, 0 deletions
diff --git a/node_modules/get-caller-file/LICENSE.md b/node_modules/get-caller-file/LICENSE.md
new file mode 100644
index 0000000..bf3e1c0
--- /dev/null
+++ b/node_modules/get-caller-file/LICENSE.md
@@ -0,0 +1,6 @@
+ISC License (ISC)
+Copyright 2018 Stefan Penner
+
+Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md
new file mode 100644
index 0000000..1944927
--- /dev/null
+++ b/node_modules/get-caller-file/README.md
@@ -0,0 +1,4 @@
+# get-caller-file
+
+[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file)
+[![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)
diff --git a/node_modules/get-caller-file/index.js b/node_modules/get-caller-file/index.js
new file mode 100644
index 0000000..03e7dfc
--- /dev/null
+++ b/node_modules/get-caller-file/index.js
@@ -0,0 +1,20 @@
+'use strict';
+
+// Call this function in a another function to find out the file from
+// which that function was called from. (Inspects the v8 stack trace)
+//
+// Inspired by http://stackoverflow.com/questions/13227489
+
+module.exports = function getCallerFile(_position) {
+ var oldPrepareStackTrace = Error.prepareStackTrace;
+ Error.prepareStackTrace = function(err, stack) { return stack; };
+ var stack = new Error().stack;
+ Error.prepareStackTrace = oldPrepareStackTrace;
+
+ var position = _position ? _position : 2;
+
+ // stack[0] holds this file
+ // stack[1] holds where this function was called
+ // stack[2] holds the file we're interested in
+ return stack[position] ? stack[position].getFileName() : undefined;
+};
diff --git a/node_modules/get-caller-file/package.json b/node_modules/get-caller-file/package.json
new file mode 100644
index 0000000..d3a1ea1
--- /dev/null
+++ b/node_modules/get-caller-file/package.json
@@ -0,0 +1,62 @@
+{
+ "_args": [
+ [
+ "get-caller-file@1.0.3",
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "get-caller-file@1.0.3",
+ "_id": "get-caller-file@1.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
+ "_location": "/get-caller-file",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "get-caller-file@1.0.3",
+ "name": "get-caller-file",
+ "escapedName": "get-caller-file",
+ "rawSpec": "1.0.3",
+ "saveSpec": null,
+ "fetchSpec": "1.0.3"
+ },
+ "_requiredBy": [
+ "/yargs"
+ ],
+ "_resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+ "_spec": "1.0.3",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Stefan Penner"
+ },
+ "bugs": {
+ "url": "https://github.com/stefanpenner/get-caller-file/issues"
+ },
+ "description": "[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/project/embercli/get-caller-file/branch/master)",
+ "devDependencies": {
+ "chai": "^4.1.2",
+ "ensure-posix-path": "^1.0.1",
+ "mocha": "^5.2.0"
+ },
+ "directories": {
+ "test": "tests"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/stefanpenner/get-caller-file#readme",
+ "license": "ISC",
+ "main": "index.js",
+ "name": "get-caller-file",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stefanpenner/get-caller-file.git"
+ },
+ "scripts": {
+ "test": "mocha test",
+ "test:debug": "mocha test"
+ },
+ "version": "1.0.3"
+}