{"id":19574696,"url":"https://github.com/stringparser/callers-path","last_synced_at":"2025-07-27T22:34:29.672Z","repository":{"id":21436788,"uuid":"24755025","full_name":"stringparser/callers-path","owner":"stringparser","description":"V8 stacktrace API based caller's path","archived":false,"fork":false,"pushed_at":"2015-06-23T10:59:22.000Z","size":204,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T20:05:04.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stringparser.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-03T10:45:33.000Z","updated_at":"2015-07-19T17:46:50.000Z","dependencies_parsed_at":"2022-08-21T12:11:05.597Z","dependency_job_id":null,"html_url":"https://github.com/stringparser/callers-path","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stringparser/callers-path","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fcallers-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fcallers-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fcallers-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fcallers-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stringparser","download_url":"https://codeload.github.com/stringparser/callers-path/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stringparser%2Fcallers-path/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267436671,"owners_count":24086898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T06:43:30.544Z","updated_at":"2025-07-27T22:34:29.573Z","avatar_url":"https://github.com/stringparser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# callers-path \n\n[\u003cimg alt=\"build\" src=\"http://img.shields.io/travis/stringparser/callers-path/master.svg?style=flat-square\" align=\"left\"/\u003e](https://travis-ci.org/stringparser/callers-path/builds)\n[\u003cimg alt=\"NPM version\" src=\"http://img.shields.io/npm/v/callers-path.svg?style=flat-square\" align=\"right\"/\u003e](http://www.npmjs.org/package/callers-path)\n\u003cbr\u003e\n\n[V8 stacktrace API](https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi) based caller's path\n\n## install\n\n    npm install --save callers-path\n\n## usage\n\nexample/moduleB.js\n```js\nvar callersPath = require('callers-path');\nmodule.exports = function(){\n  console.log(callersPath());\n};\n```\n\nexample/moduleA.js\n\n```js\nvar moduleB = require('./moduleB');\n    moduleB();\n// =\u003e example/moduleA.js\n```\n\n### documentation\n\n`require('callers-path')([frames, origin])`\n\n - `frames` if specified should be an `integer` bigger than `0` or `Infinity`.\n - `origin` if specified should be a function.\n - if no arguments, the default number of `frames` is `2` so the `origin` is the module itself. The stack is sliced by one.\n\n## why\n\nYou would like to set how many frames are recorded (`Error.stackTraceLimit`) and from which function the stack should be traced back (`Error.captureStackTrace`).\n\nBy default two frames are recorded, though you can even lower it to one providing a function from which start.\n\n### inspirated by\n\nIt serves for the same use cases implemented on this cool modules\n\n - [visionmedia `callsite`](https://github.com/visionmedia/callsite)\n - [sindresorhus `callsites`](https://github.com/sindresorhus/callsites)\n - [sindresorhus `caller-path`](https://github.com/sindresorhus/caller-path)\n\n## test\n\n    npm test\n\n### license\n\n[\u003cimg alt=\"LICENSE\" src=\"http://img.shields.io/npm/l/callers-path.svg?style=flat-square\"/\u003e](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fcallers-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstringparser%2Fcallers-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstringparser%2Fcallers-path/lists"}