diff options
Diffstat (limited to 'node_modules/get-caller-file')
-rw-r--r-- | node_modules/get-caller-file/README.md | 4 | ||||
-rw-r--r-- | node_modules/get-caller-file/index.js | 20 | ||||
-rw-r--r-- | node_modules/get-caller-file/package.json | 31 |
3 files changed, 0 insertions, 55 deletions
diff --git a/node_modules/get-caller-file/README.md b/node_modules/get-caller-file/README.md deleted file mode 100644 index 194492736..000000000 --- a/node_modules/get-caller-file/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# get-caller-file - -[](https://travis-ci.org/stefanpenner/get-caller-file) -[](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 deleted file mode 100644 index 03e7dfc39..000000000 --- a/node_modules/get-caller-file/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'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 deleted file mode 100644 index eb121a6ff..000000000 --- a/node_modules/get-caller-file/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "get-caller-file", - "version": "1.0.3", - "description": "", - "main": "index.js", - "directories": { - "test": "tests" - }, - "files": [ - "index.js" - ], - "scripts": { - "test": "mocha test", - "test:debug": "mocha test" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/stefanpenner/get-caller-file.git" - }, - "author": "Stefan Penner", - "license": "ISC", - "bugs": { - "url": "https://github.com/stefanpenner/get-caller-file/issues" - }, - "homepage": "https://github.com/stefanpenner/get-caller-file#readme", - "devDependencies": { - "chai": "^4.1.2", - "ensure-posix-path": "^1.0.1", - "mocha": "^5.2.0" - } -} |