{"id":18310905,"url":"https://github.com/jimschubert/stripansi","last_synced_at":"2026-07-13T01:31:33.794Z","repository":{"id":64297885,"uuid":"565597453","full_name":"jimschubert/stripansi","owner":"jimschubert","description":"Strip ansi escape codes, ala chalk/strip-ansi","archived":false,"fork":false,"pushed_at":"2022-11-13T23:01:23.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-17T03:04:55.151Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/jimschubert/stripansi","language":"Go","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/jimschubert.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":null,"support":null}},"created_at":"2022-11-13T22:18:42.000Z","updated_at":"2025-07-16T18:23:48.000Z","dependencies_parsed_at":"2023-01-15T09:01:43.349Z","dependency_job_id":null,"html_url":"https://github.com/jimschubert/stripansi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jimschubert/stripansi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fstripansi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fstripansi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fstripansi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fstripansi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jimschubert","download_url":"https://codeload.github.com/jimschubert/stripansi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jimschubert%2Fstripansi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35407393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"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":["go","golang"],"created_at":"2024-11-05T16:15:50.378Z","updated_at":"2026-07-13T01:31:33.789Z","avatar_url":"https://github.com/jimschubert.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stripansi\n\n[![GoDoc](https://godoc.org/github.com/jimschubert/stripansi?status.svg)](https://godoc.org/github.com/jimschubert/stripansi)\n\nThis is a port of Sindre Sorhus's excellent [chalk/strip-ansi](https://github.com/chalk/strip-ansi) to Go.\n\nIt's useful for stripping ANSI escape codes from strings or byte slices, which is often necessary when processing CLI output for logs, tests, or other text-based tools.\n\n## Install\n\n```\n$ go get -u github.com/jimschubert/stripansi\n```\n\n## Usage\n\n### Strings\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/jimschubert/stripansi\"\n)\n\nfunc main() {\n\tresult := stripansi.String(\"\\x1b[30mfoo\\x1b[0m \\x1b[30mbar\\x1b[0m \\x1b[30mbaz\\x1b[0m\")\n\tfmt.Println(result)\n\t// Output: foo bar baz\n}\n```\n\n### Bytes\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/jimschubert/stripansi\"\n)\n\nfunc main() {\n\tresult := stripansi.Bytes([]byte(\"\\x1b[30mfoo\\x1b[0m\"))\n\tfmt.Printf(\"%s\\n\", result)\n\t// Output: foo\n}\n```\n\n## License\n\nThis is [licensed](./LICENSE) under MIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimschubert%2Fstripansi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjimschubert%2Fstripansi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjimschubert%2Fstripansi/lists"}