{"id":15042790,"url":"https://github.com/sindresorhus/capture-stack-trace","last_synced_at":"2025-04-05T12:08:37.189Z","repository":{"id":35358986,"uuid":"39621696","full_name":"sindresorhus/capture-stack-trace","owner":"sindresorhus","description":"Ponyfill for Error#captureStackTrace","archived":false,"fork":false,"pushed_at":"2022-10-10T14:09:58.000Z","size":8,"stargazers_count":61,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T04:26:17.054Z","etag":null,"topics":["javascript","ponyfill"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sindresorhus.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null},"funding":{"github":"sindresorhus","open_collective":"sindresorhus","custom":"https://sindresorhus.com/donate"}},"created_at":"2015-07-24T08:50:30.000Z","updated_at":"2025-01-07T20:11:12.000Z","dependencies_parsed_at":"2022-09-17T12:01:16.681Z","dependency_job_id":null,"html_url":"https://github.com/sindresorhus/capture-stack-trace","commit_stats":null,"previous_names":["floatdrop/capture-stack-trace"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fcapture-stack-trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fcapture-stack-trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fcapture-stack-trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindresorhus%2Fcapture-stack-trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindresorhus","download_url":"https://codeload.github.com/sindresorhus/capture-stack-trace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246812024,"owners_count":20837883,"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","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":["javascript","ponyfill"],"created_at":"2024-09-24T20:47:58.819Z","updated_at":"2025-04-05T12:08:37.163Z","avatar_url":"https://github.com/sindresorhus.png","language":"JavaScript","funding_links":["https://github.com/sponsors/sindresorhus","https://opencollective.com/sindresorhus","https://sindresorhus.com/donate"],"categories":[],"sub_categories":[],"readme":"# capture-stack-trace\n\n\u003e [Ponyfill](https://ponyfill.com) for [`Error#captureStackTrace`](https://nodejs.org/api/errors.html#errorcapturestacktracetargetobject-constructoropt)\n\nThis is useful for creating cross-platform code as `Error#captureStackTrace` is only available in V8-based JavaScript environments like Node.js and Chrome.\n\n## Install\n\n```sh\nnpm install capture-stack-trace\n```\n\n## Usage\n\n```js\nimport captureStackTrace from 'capture-stack-trace';\n\nconst object = {};\ncaptureStackTrace(object);\nobject.stack;  // Similar to `new Error().stack`\n```\n\n## API\n\n### captureStackTrace(object)\n\nCreates a `.stack` property on the given `object`, which when accessed returns a string representing the location in the code at which `captureStackTrace()` was called.\n\n**Note:** This ponyfill does not support the second parameter of `Error#captureStackTrace`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fcapture-stack-trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindresorhus%2Fcapture-stack-trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindresorhus%2Fcapture-stack-trace/lists"}