{"id":20435963,"url":"https://github.com/d4nyll/escape-chars","last_synced_at":"2025-09-01T04:36:54.375Z","repository":{"id":47993683,"uuid":"149882152","full_name":"d4nyll/escape-chars","owner":"d4nyll","description":"Escape special characters in a string","archived":false,"fork":false,"pushed_at":"2022-12-30T18:15:53.000Z","size":157,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T21:37:58.498Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d4nyll.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":"2018-09-22T14:01:02.000Z","updated_at":"2023-03-10T09:27:03.000Z","dependencies_parsed_at":"2023-01-31T12:45:24.335Z","dependency_job_id":null,"html_url":"https://github.com/d4nyll/escape-chars","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d4nyll/escape-chars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fescape-chars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fescape-chars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fescape-chars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fescape-chars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d4nyll","download_url":"https://codeload.github.com/d4nyll/escape-chars/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fescape-chars/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273074322,"owners_count":25040927,"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-09-01T02:00:09.058Z","response_time":120,"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-15T08:38:39.254Z","updated_at":"2025-09-01T04:36:54.319Z","avatar_url":"https://github.com/d4nyll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# special-escape\n\nEscape special characters in a string\n\n## Installation\n\n[![NPM](https://nodei.co/npm/special-escape.png?compact=true)](https://nodei.co/npm/special-escape/)\n\n`special-escape` is published at [npmjs.com](https://www.npmjs.com/), and can be installed using [`npm`](https://docs.npmjs.com/cli/npm) or [`yarn`](https://yarnpkg.com/lang/en/).\n\n```bash\n$ npm install special-escape  # npm\n$ yarn add special-escape     # yarn\n```\n\n```js\nimport resolveWhen from 'special-escape';       // ES6+\nconst resolveWhen = require('special-escape');  // ES5\n```\n\n## Usage\n\n```js\nconst specialChars = ['+', '-', '=', '\u003e', '.', '!', '(', ')', '{', '}', '[', ']', '^', '\"', '~', '*', '?', ':', '\\\\', '/',]\n\nconst escapedString = escapeChars('$2a$10$!NgGQwxmjy..4aQTdsOJw\\\\O7HUd6FfiFQ2e/2F6XJQh1PeZjWlEbmK', specialChars);\n\nassert(escapedString, '$2a$10$\\!NgGQwxmjy\\.\\.4aQTdsOJw\\\\O7HUd6FfiFQ2e\\/2F6XJQh1PeZjWlEbmK');\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fescape-chars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd4nyll%2Fescape-chars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fescape-chars/lists"}