{"id":22021574,"url":"https://github.com/lamansky/char-unescape","last_synced_at":"2026-04-05T20:33:40.076Z","repository":{"id":92611936,"uuid":"205825719","full_name":"lamansky/char-unescape","owner":"lamansky","description":"[Node.js] Removes a given escape sequence from before characters in a string. Correctly handles double-escapes by only unescaping them once.","archived":false,"fork":false,"pushed_at":"2019-09-02T09:45:11.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T16:45:12.395Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lamansky.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-02T09:43:56.000Z","updated_at":"2019-09-02T09:45:12.000Z","dependencies_parsed_at":"2023-04-12T04:01:55.142Z","dependency_job_id":null,"html_url":"https://github.com/lamansky/char-unescape","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fchar-unescape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fchar-unescape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fchar-unescape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamansky%2Fchar-unescape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamansky","download_url":"https://codeload.github.com/lamansky/char-unescape/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245085063,"owners_count":20558327,"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":[],"created_at":"2024-11-30T06:13:00.358Z","updated_at":"2025-12-30T23:35:09.367Z","avatar_url":"https://github.com/lamansky.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# char-unescape\n\nRemoves a given escape sequence from before characters in a string. Correctly handles double-escapes by only unescaping them once.\n\n## Installation\n\nRequires [Node.js](https://nodejs.org/) 8 or above.\n\n```bash\nnpm i char-unescape\n```\n\n## API\n\nThe module exports a single function.\n\n### Parameter\n\nOptional: `escapeChar` (string): The escape sequence to remove. Defaults to `\\`.\n\n### Return Value\n\nReturns a function which accepts a single parameter: a string to which the unescape operation should be applied.\n\n## Example\n\n```javascript\n// Note the function call!\n// No arguments are passed here because we're using\n// the default backslash escape character.\nconst charUnescape = require('char-unescape')()\n\ncharUnescape(\"This is \\\\\\\\a \\\\'test\\\\'\") // \"This is \\\\a 'test'\"\n```\n\n```javascript\nconst charUnescape = require('char-unescape')('@')\n\ncharUnescape(\"This is @@a @'test@'\") // \"This is @a 'test'\"\n```\n\n## Related\n\n* [char-escape](https://github.com/lamansky/char-escape)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamansky%2Fchar-unescape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamansky%2Fchar-unescape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamansky%2Fchar-unescape/lists"}