| 1 |
{ |
| 2 |
"_id": "caller-path", |
| 3 |
"_rev": "10-6a784a60af73e3716a06a2afa47b8915", |
| 4 |
"name": "caller-path", |
| 5 |
"description": "Get the path of the caller function", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "3.0.0" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"0.1.0": { |
| 11 |
"name": "caller-path", |
| 12 |
"version": "0.1.0", |
| 13 |
"description": "Get the path of the caller module", |
| 14 |
"license": "MIT", |
| 15 |
"repository": { |
| 16 |
"type": "git", |
| 17 |
"url": "git://github.com/sindresorhus/caller-path" |
| 18 |
}, |
| 19 |
"author": { |
| 20 |
"name": "Sindre Sorhus", |
| 21 |
"email": "[email protected]", |
| 22 |
"url": "http://sindresorhus.com" |
| 23 |
}, |
| 24 |
"engines": { |
| 25 |
"node": ">=0.10.0" |
| 26 |
}, |
| 27 |
"scripts": { |
| 28 |
"test": "mocha" |
| 29 |
}, |
| 30 |
"files": [ |
| 31 |
"index.js" |
| 32 |
], |
| 33 |
"keywords": [ |
| 34 |
"caller", |
| 35 |
"calling", |
| 36 |
"module", |
| 37 |
"path", |
| 38 |
"parent", |
| 39 |
"callsites", |
| 40 |
"callsite", |
| 41 |
"stacktrace", |
| 42 |
"stack", |
| 43 |
"trace", |
| 44 |
"function", |
| 45 |
"file" |
| 46 |
], |
| 47 |
"dependencies": { |
| 48 |
"callsites": "^0.2.0" |
| 49 |
}, |
| 50 |
"devDependencies": { |
| 51 |
"mocha": "*" |
| 52 |
}, |
| 53 |
"bugs": { |
| 54 |
"url": "https://github.com/sindresorhus/caller-path/issues" |
| 55 |
}, |
| 56 |
"homepage": "https://github.com/sindresorhus/caller-path", |
| 57 |
"_id": "[email protected]", |
| 58 |
"dist": { |
| 59 |
"shasum": "94085ef63581ecd3daa92444a8fe94e82577751f", |
| 60 |
"tarball": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz" |
| 61 |
}, |
| 62 |
"_from": ".", |
| 63 |
"_npmVersion": "1.4.6", |
| 64 |
"_npmUser": { |
| 65 |
"name": "sindresorhus", |
| 66 |
"email": "[email protected]" |
| 67 |
}, |
| 68 |
"maintainers": [ |
| 69 |
{ |
| 70 |
"name": "sindresorhus", |
| 71 |
"email": "[email protected]" |
| 72 |
} |
| 73 |
], |
| 74 |
"directories": {} |
| 75 |
}, |
| 76 |
"1.0.0": { |
| 77 |
"name": "caller-path", |
| 78 |
"version": "1.0.0", |
| 79 |
"description": "Get the path of the caller function", |
| 80 |
"license": "MIT", |
| 81 |
"repository": { |
| 82 |
"type": "git", |
| 83 |
"url": "https://github.com/sindresorhus/caller-path" |
| 84 |
}, |
| 85 |
"author": { |
| 86 |
"name": "Sindre Sorhus", |
| 87 |
"email": "[email protected]", |
| 88 |
"url": "sindresorhus.com" |
| 89 |
}, |
| 90 |
"engines": { |
| 91 |
"node": ">=0.10.0" |
| 92 |
}, |
| 93 |
"scripts": { |
| 94 |
"test": "node test.js" |
| 95 |
}, |
| 96 |
"files": [ |
| 97 |
"index.js" |
| 98 |
], |
| 99 |
"keywords": [ |
| 100 |
"caller", |
| 101 |
"calling", |
| 102 |
"module", |
| 103 |
"path", |
| 104 |
"parent", |
| 105 |
"callsites", |
| 106 |
"callsite", |
| 107 |
"stacktrace", |
| 108 |
"stack", |
| 109 |
"trace", |
| 110 |
"function", |
| 111 |
"file" |
| 112 |
], |
| 113 |
"dependencies": { |
| 114 |
"caller-callsite": "^1.0.0" |
| 115 |
}, |
| 116 |
"devDependencies": { |
| 117 |
"ava": "0.0.4" |
| 118 |
}, |
| 119 |
"gitHead": "f4b4451e4c7bb6d9a3593ae2daea1b8a3c65568d", |
| 120 |
"bugs": { |
| 121 |
"url": "https://github.com/sindresorhus/caller-path/issues" |
| 122 |
}, |
| 123 |
"homepage": "https://github.com/sindresorhus/caller-path", |
| 124 |
"_id": "[email protected]", |
| 125 |
"_shasum": "881d95105527cad47944c0444232436100056f85", |
| 126 |
"_from": ".", |
| 127 |
"_npmVersion": "1.4.28", |
| 128 |
"_npmUser": { |
| 129 |
"name": "sindresorhus", |
| 130 |
"email": "[email protected]" |
| 131 |
}, |
| 132 |
"maintainers": [ |
| 133 |
{ |
| 134 |
"name": "sindresorhus", |
| 135 |
"email": "[email protected]" |
| 136 |
} |
| 137 |
], |
| 138 |
"dist": { |
| 139 |
"shasum": "881d95105527cad47944c0444232436100056f85", |
| 140 |
"tarball": "https://registry.npmjs.org/caller-path/-/caller-path-1.0.0.tgz" |
| 141 |
}, |
| 142 |
"directories": {} |
| 143 |
}, |
| 144 |
"2.0.0": { |
| 145 |
"name": "caller-path", |
| 146 |
"version": "2.0.0", |
| 147 |
"description": "Get the path of the caller function", |
| 148 |
"license": "MIT", |
| 149 |
"repository": { |
| 150 |
"type": "git", |
| 151 |
"url": "git+https://github.com/sindresorhus/caller-path.git" |
| 152 |
}, |
| 153 |
"author": { |
| 154 |
"name": "Sindre Sorhus", |
| 155 |
"email": "[email protected]", |
| 156 |
"url": "sindresorhus.com" |
| 157 |
}, |
| 158 |
"engines": { |
| 159 |
"node": ">=4" |
| 160 |
}, |
| 161 |
"scripts": { |
| 162 |
"test": "xo && ava" |
| 163 |
}, |
| 164 |
"files": [ |
| 165 |
"index.js" |
| 166 |
], |
| 167 |
"keywords": [ |
| 168 |
"caller", |
| 169 |
"calling", |
| 170 |
"module", |
| 171 |
"path", |
| 172 |
"parent", |
| 173 |
"callsites", |
| 174 |
"callsite", |
| 175 |
"stacktrace", |
| 176 |
"stack", |
| 177 |
"trace", |
| 178 |
"function", |
| 179 |
"file" |
| 180 |
], |
| 181 |
"dependencies": { |
| 182 |
"caller-callsite": "^2.0.0" |
| 183 |
}, |
| 184 |
"devDependencies": { |
| 185 |
"ava": "*", |
| 186 |
"xo": "*" |
| 187 |
}, |
| 188 |
"xo": { |
| 189 |
"esnext": true |
| 190 |
}, |
| 191 |
"gitHead": "9fdd6db85d0a82b15ad57fc661d675712b30785a", |
| 192 |
"bugs": { |
| 193 |
"url": "https://github.com/sindresorhus/caller-path/issues" |
| 194 |
}, |
| 195 |
"homepage": "https://github.com/sindresorhus/caller-path#readme", |
| 196 |
"_id": "[email protected]", |
| 197 |
"_shasum": "468f83044e369ab2010fac5f06ceee15bb2cb1f4", |
| 198 |
"_from": ".", |
| 199 |
"_npmVersion": "2.15.9", |
| 200 |
"_nodeVersion": "4.5.0", |
| 201 |
"_npmUser": { |
| 202 |
"name": "sindresorhus", |
| 203 |
"email": "[email protected]" |
| 204 |
}, |
| 205 |
"dist": { |
| 206 |
"shasum": "468f83044e369ab2010fac5f06ceee15bb2cb1f4", |
| 207 |
"tarball": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz" |
| 208 |
}, |
| 209 |
"maintainers": [ |
| 210 |
{ |
| 211 |
"name": "sindresorhus", |
| 212 |
"email": "[email protected]" |
| 213 |
} |
| 214 |
], |
| 215 |
"_npmOperationalInternal": { |
| 216 |
"host": "packages-16-east.internal.npmjs.com", |
| 217 |
"tmp": "tmp/caller-path-2.0.0.tgz_1472346183708_0.9669214419554919" |
| 218 |
}, |
| 219 |
"directories": {} |
| 220 |
}, |
| 221 |
"3.0.0": { |
| 222 |
"name": "caller-path", |
| 223 |
"version": "3.0.0", |
| 224 |
"description": "Get the path of the caller function", |
| 225 |
"license": "MIT", |
| 226 |
"repository": { |
| 227 |
"type": "git", |
| 228 |
"url": "git+https://github.com/sindresorhus/caller-path.git" |
| 229 |
}, |
| 230 |
"author": { |
| 231 |
"name": "Sindre Sorhus", |
| 232 |
"email": "[email protected]", |
| 233 |
"url": "sindresorhus.com" |
| 234 |
}, |
| 235 |
"engines": { |
| 236 |
"node": ">=8" |
| 237 |
}, |
| 238 |
"scripts": { |
| 239 |
"test": "xo && ava && tsd" |
| 240 |
}, |
| 241 |
"keywords": [ |
| 242 |
"caller", |
| 243 |
"calling", |
| 244 |
"module", |
| 245 |
"path", |
| 246 |
"parent", |
| 247 |
"callsites", |
| 248 |
"callsite", |
| 249 |
"stacktrace", |
| 250 |
"stack", |
| 251 |
"trace", |
| 252 |
"function", |
| 253 |
"file" |
| 254 |
], |
| 255 |
"dependencies": { |
| 256 |
"caller-callsite": "^4.1.0" |
| 257 |
}, |
| 258 |
"devDependencies": { |
| 259 |
"ava": "^2.4.0", |
| 260 |
"tsd": "^0.11.0", |
| 261 |
"xo": "^0.25.3" |
| 262 |
}, |
| 263 |
"gitHead": "b00a61dd2cc8b90430c96bfefa1e259263e1404d", |
| 264 |
"bugs": { |
| 265 |
"url": "https://github.com/sindresorhus/caller-path/issues" |
| 266 |
}, |
| 267 |
"homepage": "https://github.com/sindresorhus/caller-path#readme", |
| 268 |
"_id": "[email protected]", |
| 269 |
"_nodeVersion": "10.17.0", |
| 270 |
"_npmVersion": "6.11.3", |
| 271 |
"_npmUser": { |
| 272 |
"name": "sindresorhus", |
| 273 |
"email": "[email protected]" |
| 274 |
}, |
| 275 |
"dist": { |
| 276 |
"integrity": "sha512-8nvMBmBgTmEfAXywJf27jbPZlURi5xUWLwkTXa3hZFcEZa5iRnMP4sF0p00CstWNHKBENVyYWDRSByNRdshdgQ==", |
| 277 |
"shasum": "a13cbec75eea1b355e3f92dc0df4288b7eebdc5f", |
| 278 |
"tarball": "https://registry.npmjs.org/caller-path/-/caller-path-3.0.0.tgz", |
| 279 |
"fileCount": 5, |
| 280 |
"unpackedSize": 5119, |
| 281 |
"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" |
| 282 |
}, |
| 283 |
"maintainers": [ |
| 284 |
{ |
| 285 |
"name": "sindresorhus", |
| 286 |
"email": "[email protected]" |
| 287 |
} |
| 288 |
], |
| 289 |
"directories": {}, |
| 290 |
"_npmOperationalInternal": { |
| 291 |
"host": "s3://npm-registry-packages", |
| 292 |
"tmp": "tmp/caller-path_3.0.0_1574395460691_0.21774906369149094" |
| 293 |
}, |
| 294 |
"_hasShrinkwrap": false |
| 295 |
} |
| 296 |
}, |
| 297 |
"readme": "# caller-path [](https://travis-ci.org/sindresorhus/caller-path)\n\n> Get the path of the caller function\n\n**Important:** You have to use `'use strict';` in your code for this module to work correctly, or make sure the module is an ESM module, which is implicitly strict.\n\n## Install\n\n```\n$ npm install caller-path\n```\n\n## Usage\n\n```js\n// foo.js\nconst callerPath = require('caller-path');\n\nmodule.exports = () => {\n\tconsole.log(callerPath());\n\t//=> '/Users/sindresorhus/dev/unicorn/bar.js'\n}\n```\n\n```js\n// bar.js\nconst foo = require('./foo');\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\nconst callerPath = require('caller-path');\n\nmodule.exports = () => {\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\nconst foo = require('./foo');\n\nmodule.exports = () => {\n\tfoo();\n}\n```\n\n```js\n// foobar.js\nconst bar = require('./bar');\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", |
| 298 |
"maintainers": [ |
| 299 |
{ |
| 300 |
"name": "sindresorhus", |
| 301 |
"email": "[email protected]" |
| 302 |
} |
| 303 |
], |
| 304 |
"time": { |
| 305 |
"modified": "2019-11-22T04:04:23.117Z", |
| 306 |
"created": "2014-04-19T10:18:32.644Z", |
| 307 |
"0.1.0": "2014-04-19T10:18:32.644Z", |
| 308 |
"1.0.0": "2015-01-24T16:20:15.948Z", |
| 309 |
"2.0.0": "2016-08-28T01:03:04.687Z", |
| 310 |
"3.0.0": "2019-11-22T04:04:20.816Z" |
| 311 |
}, |
| 312 |
"homepage": "https://github.com/sindresorhus/caller-path#readme", |
| 313 |
"keywords": [ |
| 314 |
"caller", |
| 315 |
"calling", |
| 316 |
"module", |
| 317 |
"path", |
| 318 |
"parent", |
| 319 |
"callsites", |
| 320 |
"callsite", |
| 321 |
"stacktrace", |
| 322 |
"stack", |
| 323 |
"trace", |
| 324 |
"function", |
| 325 |
"file" |
| 326 |
], |
| 327 |
"repository": { |
| 328 |
"type": "git", |
| 329 |
"url": "git+https://github.com/sindresorhus/caller-path.git" |
| 330 |
}, |
| 331 |
"author": { |
| 332 |
"name": "Sindre Sorhus", |
| 333 |
"email": "[email protected]", |
| 334 |
"url": "sindresorhus.com" |
| 335 |
}, |
| 336 |
"bugs": { |
| 337 |
"url": "https://github.com/sindresorhus/caller-path/issues" |
| 338 |
}, |
| 339 |
"license": "MIT", |
| 340 |
"readmeFilename": "readme.md", |
| 341 |
"users": { |
| 342 |
"stringparser": true, |
| 343 |
"bojand": true, |
| 344 |
"andfaulkner": true, |
| 345 |
"kevin.teljeur": true |
| 346 |
} |
| 347 |
} |