{"_id":"get-caller-file","_rev":"2924","name":"get-caller-file","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.a","dist-tags":{"latest":"2.0.5"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"time":{"modified":"2021-06-03T09:56:13.000Z","created":"2015-12-30T21:16:55.872Z","2.0.5":"2019-03-09T21:48:30.527Z","2.0.4":"2019-03-09T04:25:14.891Z","2.0.3":"2019-03-09T04:22:54.035Z","2.0.2":"2019-03-09T04:09:13.843Z","2.0.1":"2018-12-11T18:51:04.123Z","2.0.0":"2018-07-11T15:24:43.385Z","1.0.3":"2018-07-11T14:14:42.542Z","1.0.2":"2016-08-09T00:52:30.463Z","1.0.1":"2015-12-30T22:51:03.441Z","1.0.0":"2015-12-30T21:16:55.872Z"},"users":{"insomniaqc":true},"author":{"name":"Stefan Penner"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"versions":{"2.0.5":{"name":"get-caller-file","version":"2.0.5","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.a","main":"index.js","directories":{"test":"tests"},"scripts":{"prepare":"tsc","test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"Stefan Penner"},"license":"ISC","bugs":{"url":"https://github.com/stefanpenner/get-caller-file/issues"},"homepage":"https://github.com/stefanpenner/get-caller-file#readme","devDependencies":{"@types/chai":"^4.1.7","@types/ensure-posix-path":"^1.0.0","@types/mocha":"^5.2.6","@types/node":"^11.10.5","chai":"^4.1.2","ensure-posix-path":"^1.0.1","mocha":"^5.2.0","typescript":"^3.3.3333"},"engines":{"node":"6.* || 8.* || >= 10.*"},"gitHead":"2383bf9e98ed3c568ff69d7586cf59c0f1dcb9d3","_id":"get-caller-file@2.0.5","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"4f94412a82db32f36e3b0b9741f8a97feb031f7e","size":2383,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-2.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-2.0.5.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_2.0.5_1552168110399_0.9644168203659611"},"_hasShrinkwrap":false,"publish_time":1552168110527,"_cnpm_publish_time":1552168110527},"2.0.4":{"name":"get-caller-file","version":"2.0.4","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.a","main":"index.js","directories":{"test":"tests"},"scripts":{"prepare":"tsc","test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"Stefan Penner"},"license":"ISC","bugs":{"url":"https://github.com/stefanpenner/get-caller-file/issues"},"homepage":"https://github.com/stefanpenner/get-caller-file#readme","devDependencies":{"@types/chai":"^4.1.7","@types/ensure-posix-path":"^1.0.0","@types/mocha":"^5.2.6","chai":"^4.1.2","ensure-posix-path":"^1.0.1","mocha":"^5.2.0","typescript":"^3.3.3333"},"engines":{"node":"6.* || 8.* || >= 10.*"},"dependencies":{"@types/node":"^11.10.5"},"gitHead":"27d3f01d09093efb577058fcc765ed4f8dc062e5","_id":"get-caller-file@2.0.4","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"b096b4a108afa0a955d62e0572ef3e9fa6c729b9","size":2388,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-2.0.4.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_2.0.4_1552105514768_0.5677630345641587"},"_hasShrinkwrap":false,"publish_time":1552105514891,"_cnpm_publish_time":1552105514891},"2.0.3":{"name":"get-caller-file","version":"2.0.3","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.a","main":"index.js","directories":{"test":"tests"},"scripts":{"prepare":"tsc","test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"Stefan Penner"},"license":"ISC","bugs":{"url":"https://github.com/stefanpenner/get-caller-file/issues"},"homepage":"https://github.com/stefanpenner/get-caller-file#readme","devDependencies":{"@types/chai":"^4.1.7","@types/ensure-posix-path":"^1.0.0","@types/mocha":"^5.2.6","chai":"^4.1.2","ensure-posix-path":"^1.0.1","mocha":"^5.2.0","typescript":"^3.3.3333"},"engines":{"node":"6.* || 8.* || >= 10.*"},"dependencies":{"@types/node":"^11.10.5"},"gitHead":"0640ed23fff1924d999ff44ce78fc783b6fbb793","_id":"get-caller-file@2.0.3","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"26aba20816dc79f546e808aedf12e46ff83e85df","size":2388,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-2.0.3.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_2.0.3_1552105373904_0.9808998025668827"},"_hasShrinkwrap":false,"publish_time":1552105374035,"_cnpm_publish_time":1552105374035},"2.0.2":{"name":"get-caller-file","version":"2.0.2","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.a","main":"index.js","directories":{"test":"tests"},"scripts":{"prepare":"tsc","test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"Stefan Penner"},"license":"ISC","bugs":{"url":"https://github.com/stefanpenner/get-caller-file/issues"},"homepage":"https://github.com/stefanpenner/get-caller-file#readme","devDependencies":{"@types/chai":"^4.1.7","@types/ensure-posix-path":"^1.0.0","@types/mocha":"^5.2.6","chai":"^4.1.2","ensure-posix-path":"^1.0.1","mocha":"^5.2.0","typescript":"^3.3.3333"},"engines":{"node":"6.* || 8.* || >= 10.*"},"dependencies":{"@types/node":"^11.10.5"},"gitHead":"09122abff66fc418c6d390a791cc0130af173663","_id":"get-caller-file@2.0.2","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"823e4a222500fb0d059fb01d79b9fc7c6e531859","size":2388,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-2.0.2.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_2.0.2_1552104553673_0.23167214839187245"},"_hasShrinkwrap":false,"publish_time":1552104553843,"_cnpm_publish_time":1552104553843},"2.0.1":{"name":"get-caller-file","version":"2.0.1","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.a","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"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"},"engines":{"node":"6.* || 8.* || >= 10.*"},"gitHead":"b0968745fc849de776807c68e0b716bd8f9e7e0d","_id":"get-caller-file@2.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"25835260d3a2b9665fcdbb08cb039a7bbf7011c0","size":1821,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-2.0.1.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_2.0.1_1544554263914_0.918847719521797"},"_hasShrinkwrap":false,"publish_time":1544554264123,"_cnpm_publish_time":1544554264123},"2.0.0":{"name":"get-caller-file","version":"2.0.0","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.a","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":{"name":"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"},"engines":{"node":"6.* || 8.* || >= 10.*"},"gitHead":"82a600d4d720645bd6e129518f0daa2d61ef5509","_id":"get-caller-file@2.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"1e119be08623cdb28fb6b2873e671a758aa2b6eb","size":1501,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-2.0.0.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_2.0.0_1531322683282_0.1393367369930969"},"_hasShrinkwrap":false,"publish_time":1531322683385,"_cnpm_publish_time":1531322683385},"1.0.3":{"name":"get-caller-file","version":"1.0.3","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.a","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":{"name":"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"},"gitHead":"8519eaca478b51b44e575617759a503dcf13a345","_id":"get-caller-file@1.0.3","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a","size":1400,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-1.0.3.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-caller-file_1.0.3_1531318482467_0.29196568362695974"},"_hasShrinkwrap":false,"publish_time":1531318482542,"_cnpm_publish_time":1531318482542},"1.0.2":{"name":"get-caller-file","version":"1.0.2","description":"[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/projec","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":{"name":"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":"^3.4.1","ensure-posix-path":"^1.0.1","mocha":"^2.3.4"},"gitHead":"7545c5b0b7f55a1bfffea4a57e3671d771372025","_id":"get-caller-file@1.0.2","_shasum":"f702e63127e7e231c160a80c1554acb70d5047e5","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"f702e63127e7e231c160a80c1554acb70d5047e5","size":937,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-1.0.2.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/get-caller-file-1.0.2.tgz_1470703947025_0.16134989843703806"},"publish_time":1470703950463,"_cnpm_publish_time":1470703950463,"_hasShrinkwrap":false},"1.0.1":{"name":"get-caller-file","version":"1.0.1","description":"[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/projec","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"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":"^3.4.1","ensure-posix-path":"^1.0.1","mocha":"^2.3.4"},"gitHead":"f37118eb1f54cacee2ff0c39276fa15c56dd3b4b","_id":"get-caller-file@1.0.1","_shasum":"aa6ff7b98a1b22dc0c8b3b905fab32b552f5ac41","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.0.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"aa6ff7b98a1b22dc0c8b3b905fab32b552f5ac41","size":2687,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-1.0.1.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"publish_time":1451515863441,"_cnpm_publish_time":1451515863441,"_hasShrinkwrap":false},"1.0.0":{"name":"get-caller-file","version":"1.0.0","description":"[![Build Status](https://travis-ci.org/ember-cli/ember-cli.svg?branch=master)](https://travis-ci.org/ember-cli/ember-cli) [![Build status](https://ci.appveyor.com/api/projects/status/ol2q94g1932cy14a/branch/master?svg=true)](https://ci.appveyor.com/projec","main":"index.js","directories":{"test":"tests"},"scripts":{"test":"mocha test","test:debug":"mocha test"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/get-caller-file.git"},"author":{"name":"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":"^3.4.1","ensure-posix-path":"^1.0.1","mocha":"^2.3.4"},"gitHead":"4a78c55d0f877c75ff7739f403724887c3230ec6","_id":"get-caller-file@1.0.0","_shasum":"2215e877ed56cdad79c9d693f5732436964803c9","_from":".","_npmVersion":"3.5.2","_nodeVersion":"5.0.0","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"dist":{"shasum":"2215e877ed56cdad79c9d693f5732436964803c9","size":2656,"noattachment":false,"key":"/get-caller-file/-/get-caller-file-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-caller-file/download/get-caller-file-1.0.0.tgz"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"}],"publish_time":1451510215872,"_cnpm_publish_time":1451510215872,"_hasShrinkwrap":false}},"readme":"# get-caller-file\n\n[![Build Status](https://travis-ci.org/stefanpenner/get-caller-file.svg?branch=master)](https://travis-ci.org/stefanpenner/get-caller-file)\n[![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)\n\nThis 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.\n\nInspired by http://stackoverflow.com/questions/13227489\n\n*note: this relies on Node/V8 specific APIs, as such other runtimes may not work*\n\n## Installation\n\n```bash\nyarn add get-caller-file\n```\n\n## Usage\n\nGiven:\n\n```js\n// ./foo.js\nconst getCallerFile = require('get-caller-file');\n\nmodule.exports = function() {\n  return getCallerFile(); // figures out who called it\n};\n```\n\n```js\n// index.js\nconst foo = require('./foo');\n\nfoo() // => /full/path/to/this/file/index.js\n```\n\n\n## Options:\n\n* `getCallerFile(position = 2)`: where position is stack frame whos fileName we want.\n","_attachments":{},"homepage":"https://github.com/stefanpenner/get-caller-file#readme","bugs":{"url":"https://github.com/stefanpenner/get-caller-file/issues"},"license":"ISC"}