{"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dist-tags":{"latest":"4.0.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"description":"Get the path of the caller function","readme":"# caller-path\n\n> Get the path of the caller function\n\n## Install\n\n```sh\nnpm install caller-path\n```\n\n## Usage\n\n```js\n// foo.js\nimport callerPath from 'caller-path';\n\nexport default function foo() {\n\tconsole.log(callerPath());\n\t//=> '/Users/sindresorhus/dev/unicorn/bar.js'\n}\n```\n\n```js\n// bar.js\nimport foo from './foo.js';\nfoo();\n```\n\nIf the caller's [callsite](https://github.com/sindresorhus/callsites#api) object `getFileName` was not defined for some reason, it will return `undefined`.\n\n## API\n\n### callerPath(options?)\n\nGet the path of the caller function.\n\n##### depth\n\nType: `number`\\\nDefault: `0`\n\nThe caller path depth, meaning how many levels we follow back on the stack trace.\n\nFor example:\n\n```js\n// foo.js\nimport callerPath from 'caller-path';\n\nexport default function foo() {\n\tconsole.log(callerPath());\n\t//=> '/Users/sindresorhus/dev/unicorn/foobar.js'\n\tconsole.log(callerPath({depth: 1}));\n\t//=> '/Users/sindresorhus/dev/unicorn/bar.js'\n\tconsole.log(callerPath({depth: 2}));\n\t//=> '/Users/sindresorhus/dev/unicorn/foo.js'\n}\n```\n\n```js\n// bar.js\nimport foo from './foo.js';\n\nexport default function bar() {\n\tfoo();\n}\n```\n\n```js\n// foobar.js\nimport bar from './bar.js';\nbar();\n```\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-caller-path?utm_source=npm-caller-path&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/caller-path.git"},"users":{"stringparser":true,"bojand":true,"andfaulkner":true,"kevin.teljeur":true,"flumpus-dev":true},"bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"license":"MIT","versions":{"0.1.0":{"name":"caller-path","version":"0.1.0","description":"Get the path of the caller module","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/caller-path"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"callsites":"^0.2.0"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"homepage":"https://github.com/sindresorhus/caller-path","_id":"caller-path@0.1.0","dist":{"shasum":"94085ef63581ecd3daa92444a8fe94e82577751f","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/caller-path/-/caller-path-0.1.0.tgz","integrity":"sha512-UJiE1otjXPF5/x+T3zTnSFiTOEmJoGTD9HmBoxnCUwho61a2eSNn/VwtwuIBDAo2SEOv1AJ7ARI5gCmohFLu/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbilr1OF6aCZsE7UKgP4vdaEl53AXWb3FI1HoBUzfTKAIgTb3JQhTJ6haXg8lg/MdsFZ8ErpkXZTfwuLNriF6EzU8="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"directories":{}},"1.0.0":{"name":"caller-path","version":"1.0.0","description":"Get the path of the caller function","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/caller-path"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"caller-callsite":"^1.0.0"},"devDependencies":{"ava":"0.0.4"},"gitHead":"f4b4451e4c7bb6d9a3593ae2daea1b8a3c65568d","bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"homepage":"https://github.com/sindresorhus/caller-path","_id":"caller-path@1.0.0","_shasum":"881d95105527cad47944c0444232436100056f85","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"881d95105527cad47944c0444232436100056f85","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/caller-path/-/caller-path-1.0.0.tgz","integrity":"sha512-RFdDlUC2g37oJtkoiIp6FWACcstvZOMG1qc31xLj11EtuiSvWyjFO98nJmN0+aC6IrZ8Igvf+5zcX/P2MjieXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH242hYVxviyIFQVIi7MBaODrnVXjzTv1udecx21Bp5DAiEAr/Xk/1grxoupNW+a9taxloAkEH2n1YlrHXeixRvy3Wo="}]},"directories":{}},"2.0.0":{"name":"caller-path","version":"2.0.0","description":"Get the path of the caller function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/caller-path.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"caller-callsite":"^2.0.0"},"devDependencies":{"ava":"*","xo":"*"},"xo":{"esnext":true},"gitHead":"9fdd6db85d0a82b15ad57fc661d675712b30785a","bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"homepage":"https://github.com/sindresorhus/caller-path#readme","_id":"caller-path@2.0.0","_shasum":"468f83044e369ab2010fac5f06ceee15bb2cb1f4","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.5.0","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"shasum":"468f83044e369ab2010fac5f06ceee15bb2cb1f4","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/caller-path/-/caller-path-2.0.0.tgz","integrity":"sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG4UCPjKyRPG8h5oUuMT3VJQeM5jjY3NImJs8TL9yUZZAiBoHeherfmdV6UqdWRyoYyxXIhq4sUIgUkBBpUNNWpwrw=="}]},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/caller-path-2.0.0.tgz_1472346183708_0.9669214419554919"},"directories":{}},"3.0.0":{"name":"caller-path","version":"3.0.0","description":"Get the path of the caller function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/caller-path.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"caller-callsite":"^4.1.0"},"devDependencies":{"ava":"^2.4.0","tsd":"^0.11.0","xo":"^0.25.3"},"gitHead":"b00a61dd2cc8b90430c96bfefa1e259263e1404d","bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"homepage":"https://github.com/sindresorhus/caller-path#readme","_id":"caller-path@3.0.0","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-8nvMBmBgTmEfAXywJf27jbPZlURi5xUWLwkTXa3hZFcEZa5iRnMP4sF0p00CstWNHKBENVyYWDRSByNRdshdgQ==","shasum":"a13cbec75eea1b355e3f92dc0df4288b7eebdc5f","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/caller-path/-/caller-path-3.0.0.tgz","fileCount":5,"unpackedSize":5119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd115FCRA9TVsSAnZWagAAiSEP/i5B67RSccInv5q99NJj\nlxAPtlo47O4jK47Rmw20eihY5VJgdpA6nlY1bCi19BPbMT84gqDBdPGqKhcI\n4zNtsY6WgLfbY695zvm4z9AosqpmTpdAhgqVYgCYlG3p12ZrVOpsrm5zLzJi\niBTT71wmo5DNe1xCMtuKE2KsYoLr9p2KBmnMEDt5rWGvr+RDKWq7DukfhtbH\nNrsl53U+dHMj4V3KAuubX9vbAGoeyo33M7fAq867IGAbkwIH4HQ6ar3tFkPL\ngAJ3UXKprF6dvIxRAZvNrWa8tx1ReH9QCtAX5qpX6pFB6j5F7frfPHuBmzM+\nY0D6TIUpLbz07UT+8NcWMh/fsVmoWm93OW+HPeD4xXiv7ofxZx0RjZE0HbCo\nEid+luIXC6jHHfLUK32BuRVL8yhUw68whgp6/OgtRMTSsmjuqz6gNjxiz4rF\nNvOhxl6XRpO2H6FggU70Aj34WFOYZtvoIKtbROiqKxRdiex+4ksX2x4AWxI5\nXi0h2ym6o9LaCVoHbJhvFtzRotNJRUEe0AuvO/+5Y/D2+rZSPjmWHoLl2XcL\n6k6UGoe5hQ0k1rFn9TkGzQRrtiaR63iJl0rsy8rzWkhUJhZPvTNlLOBd15f6\nzi9rcc9Jzc8qAOQ/m30wtmODVc0TOoSzuh3jYZx0ToEz75d3cN88WlPc5s3m\nBOtj\r\n=8r2T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGBPBFCqyjoRPusxmGu84k/Aqc2V4QiO7UZymUUEkrteAiEA8N8bJgVkERqJV+pBY7OEFukKYD5/9OWXwSV9EL9kHz4="}]},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/caller-path_3.0.0_1574395460691_0.21774906369149094"},"_hasShrinkwrap":false},"3.0.1":{"name":"caller-path","version":"3.0.1","description":"Get the path of the caller function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/caller-path.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"caller-callsite":"^4.1.0"},"devDependencies":{"ava":"^2.4.0","tsd":"^0.11.0","xo":"^0.25.3"},"gitHead":"5cbd2f1c21586070cf8280f0ceacfbe25798c98b","bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"homepage":"https://github.com/sindresorhus/caller-path#readme","_id":"caller-path@3.0.1","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-fhmztL4wURO/BzwJUJ4aVRdnKEFskPBbrJ8fNgl7XdUiD1ygzzlt+nhPgUBSRq2ciEVubo6x+W8vJQzm55QLLQ==","shasum":"bc932ecec3f943e10c2f8922146e23b132f932e4","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/caller-path/-/caller-path-3.0.1.tgz","fileCount":5,"unpackedSize":5040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJge/u0CRA9TVsSAnZWagAA1DIP/jolRjMyUjL+fFxlQiol\n9JlpW8mG/+ypF7LuJirXWX0vUvcDzWNSZYV0R8pMzM85SjKwjk5IT8r5TBDM\nT/H0/O/gCtcDVuSCadlnY8jbRf6chMCaw/oNaKXpJVO4OTQeFPex//7F1+G3\nOu+LG9bSms7sS6ojj8jo/GRMHCTumFamRTU+d/teyXnp0YIHZ0F5V9nLAUac\naCQYsesdgAgCyzrRrd/Ta8AJBnvv3oiwLTtNIDoRUf5eJ+yQh2+giM9ZlUkA\n10yYM/ryFCjpjwU5CVDiZhcvManjhvbM2LWmXp+1MHMe29HWP4p7ZIVPJ7EY\nhH0D669kds6nmDDU/bqnbtBwM5q61sA53OCQKZ8iocm+6zrXUVWSoryS0pnP\nPLJkmT9d8nmWqUE9VdJzjFp3Dt0mGjrQgpfx/FfnBcbmbqKk0pdlu3HHb13K\nQScsQ0SMK2iHAoJ7cYviRtJ1H5vqkswHdvBjP5RwVDviNIICy6lS42UHhGn1\n2GsAJtwJ4mKU3F4bzNmUkIxopBIZ3bH6/2+79GLSjEnoF9X/74Fa98F7LjV2\nK5Ztzbbksbzh4+elRlrvTNW5NYLFI17cEX8ZkF0KBYzJYlSYu/eiMG9eMqgG\nBk9GNKd031H1pwW0fQoPKTAW+O5jhaRSw2vReTnrVbtoNkhY854VQ9axpZVQ\nUhwo\r\n=99o5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+RPHtDP2DU41bahjjXmfRg+oSRDuYRPBBDXxfF7blqwIhAOvJ5w7vNvkWQjmKQgV2b4pSAkV3hYmeytKAAiuOEzD8"}]},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/caller-path_3.0.1_1618738099793_0.648017930500193"},"_hasShrinkwrap":false},"4.0.0":{"name":"caller-path","version":"4.0.0","description":"Get the path of the caller function","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/caller-path.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava && tsd"},"keywords":["caller","calling","module","path","parent","callsites","callsite","stacktrace","stack","trace","function","file"],"dependencies":{"caller-callsite":"^5.0.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","typescript":"^4.4.3","xo":"^0.45.0"},"gitHead":"0aced8edafead03ceb68220ef9c08cb509a8d685","bugs":{"url":"https://github.com/sindresorhus/caller-path/issues"},"homepage":"https://github.com/sindresorhus/caller-path#readme","_id":"caller-path@4.0.0","_nodeVersion":"16.10.0","_npmVersion":"7.20.3","dist":{"integrity":"sha512-18JFq7TTe4+cDKsyZETRk/IS9Xka3dRcU9VWm1C6XlkAjKPSR2bskpDSUHVQw7gvef34bi1gltzmCxToUw1oQw==","shasum":"6509f6ba633c9db306bb6de9e86295383aa1e1af","tarball":"http://repository.ncinga.com/nexus/content/groups/npm-all/caller-path/-/caller-path-4.0.0.tgz","fileCount":5,"unpackedSize":4978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2lbWCRA9TVsSAnZWagAA8OMP+gL3toPbL7EbOj7wwkBK\nmeoaaSXVzSexr6YUcwk7TbO1vwfTDqKjR5TgKG0qjRdDiV0mtezNmu8c3NVk\nwSbJQZIZkT7S/cYZ3otpj9V86kaLwam+kj4qkgz8OiTORth/nabtbc0Kvob5\n3k9NJnHQ3HuOyid66dwIpog4Seq8y9N4gBkNfj6AKijs1kNdM4Z14MSEWcMK\nRViLrRkft/dZk9asN+sDCCgjpWO+Gq4WX7FeHm1vXEd5BWbqT38eB3iiFxTX\nczSMJCcl/ZzH+XbdeqdDHFgJ2lanDTt0l/flv2byM3ZNiXjIQOFlPyGNP8nr\nzBZGin5FfOoDPta31gymnEsvjkL9c+auNYQXQ3eTAuuyZzHl/kaB98Wy2V0d\nHfqrNHuM5lM0B9o1DovgVJ6gJ2OyL5hErmaT3NZyUO3hVLgMoB4awfTjI2Ms\nk7okteD3HZxtoHJ/Ep2xaUhyUDHKpJlOmAV5kgHeui2Zgf3T4Rb9I0kgGICz\n82rtQ9BKvmIVqL8yNk9S1HdDjGcaBgRjo/3Mm+67aZhDXWe8+r8A25APlYuU\npvJqh+zBEDJC5FyDY8DMGHMdJw2sjqrbgNDweuLMWjoaeFh3h888YzLY5+Bn\nJEpFWSs71Z9YdqCToXPa55lq6JChludN9L+zhozjVp0nUbXkWn2DCzNf3PQC\nWk0E\r\n=7+Jo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCHzi1vr65yv5kkTo8iFM8N6fiW+8+k5/bj8tJMp3m2E0CIQDtSRdpIakb0htbj3R2ieXwJnQIgmR9gB5GjxWKJ55jEA=="}]},"_npmUser":{"name":"anonymous","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/caller-path_4.0.0_1633674094805_0.3330939522991412"},"_hasShrinkwrap":false}},"name":"caller-path","time":{"modified":"2023-07-10T23:17:06.669Z","created":"2014-04-19T10:18:32.644Z","0.1.0":"2014-04-19T10:18:32.644Z","1.0.0":"2015-01-24T16:20:15.948Z","2.0.0":"2016-08-28T01:03:04.687Z","3.0.0":"2019-11-22T04:04:20.816Z","3.0.1":"2021-04-18T09:28:19.928Z","4.0.0":"2021-10-08T06:21:34.915Z"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/caller-path#readme"}