{"id":32527069,"url":"https://github.com/sleeuwen/sourcemaps","last_synced_at":"2025-10-28T10:11:29.824Z","repository":{"id":40286530,"uuid":"259267714","full_name":"sleeuwen/sourcemaps","owner":"sleeuwen","description":".NET Standard library for parsing source maps","archived":false,"fork":false,"pushed_at":"2023-07-19T19:11:41.000Z","size":3439,"stargazers_count":9,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T11:52:12.143Z","etag":null,"topics":["sourcemaps","stacktraces"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/sleeuwen.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":"2020-04-27T09:31:54.000Z","updated_at":"2024-02-24T19:35:28.000Z","dependencies_parsed_at":"2023-02-04T06:30:42.786Z","dependency_job_id":null,"html_url":"https://github.com/sleeuwen/sourcemaps","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/sleeuwen/sourcemaps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleeuwen%2Fsourcemaps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleeuwen%2Fsourcemaps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleeuwen%2Fsourcemaps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleeuwen%2Fsourcemaps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sleeuwen","download_url":"https://codeload.github.com/sleeuwen/sourcemaps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sleeuwen%2Fsourcemaps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281419568,"owners_count":26498011,"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-10-28T02:00:06.022Z","response_time":60,"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":["sourcemaps","stacktraces"],"created_at":"2025-10-28T10:11:21.974Z","updated_at":"2025-10-28T10:11:29.814Z","avatar_url":"https://github.com/sleeuwen.png","language":"C#","readme":"# SourceMaps\n\n.NET Standard 2.0 library for parsing and using SourceMaps\n\n## Packages\n### SourceMaps [![NuGet Version](http://img.shields.io/nuget/v/SourceMaps.svg?style=flat)](https://www.nuget.org/packages/SourceMaps/)\nSourceMaps library that handles parsing of the sourcemap and has methods for getting the original position,\nname and file for a generated position.\n\n### SourceMaps.StackTraces [![NuGet Version](http://img.shields.io/nuget/v/SourceMaps.StackTraces.svg?style=flat)](https://www.nuget.org/packages/SourceMaps.StackTraces/)\nSourceMaps.StackTraces is an additional package that can be used to parse JavaScript stack traces\nand map them with the source map to the original files.\n\n## Usage\n### SourceMaps\nTo parse a sourcemap\n\n```csharp\nusing SourceMaps;\n\nvar sourceMap = SourceMapParser.Parse(sourceMapAsString);\n```\n\nTo get the original mapping for a given generated position, use\n\n```csharp\nvar mapping = sourceMap.OriginalPositionFor(generatedLineNumber: 1, generatedColumnNumber: 1);\n\nmapping.OriginalName; // original token name\nmapping.OriginalFileName; // original file name\nmapping.OriginalSourcePosition.LineNumber; // original line number\nmapping.OriginalSourcePosition.ColumnNumber; // original column number\n```\n\n### SourceMaps.StackTraces\nTo get the original stack trace using the source maps\n\n```csharp\nStackTraceParser.ReTrace(\n    sourceMap,\n    stackTrace: @\"ReferenceError: \"\"getExceptionProps\"\" is undefined\n    at eval code (eval code:1:1)\n    at foo (http://path/to/file.js:58:17)\n    at bar (http://path/to/file.js:109:1)\",\n    sourceRoot: \"https://localhost:5001/js/\");\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleeuwen%2Fsourcemaps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsleeuwen%2Fsourcemaps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsleeuwen%2Fsourcemaps/lists"}