{"id":15862213,"url":"https://github.com/afeiship/next-sanitize-filename","last_synced_at":"2026-04-30T00:05:11.404Z","repository":{"id":57122862,"uuid":"315220738","full_name":"afeiship/next-sanitize-filename","owner":"afeiship","description":"Sanitize a string to be safe for use as a filename by customize list.","archived":false,"fork":false,"pushed_at":"2021-01-09T08:44:53.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-07T14:18:09.787Z","etag":null,"topics":["dictionary","filename","next","replacement","sanitize","strip"],"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/afeiship.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}},"created_at":"2020-11-23T06:26:39.000Z","updated_at":"2021-01-09T08:44:56.000Z","dependencies_parsed_at":"2022-08-24T14:57:01.413Z","dependency_job_id":null,"html_url":"https://github.com/afeiship/next-sanitize-filename","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-sanitize-filename","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-sanitize-filename/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-sanitize-filename/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afeiship%2Fnext-sanitize-filename/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afeiship","download_url":"https://codeload.github.com/afeiship/next-sanitize-filename/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709936,"owners_count":20821298,"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":["dictionary","filename","next","replacement","sanitize","strip"],"created_at":"2024-10-05T22:25:40.470Z","updated_at":"2026-04-30T00:05:02.368Z","avatar_url":"https://github.com/afeiship.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-sanitize-filename\n\u003e Sanitize a string to be safe for use as a filename by customize list.\n\n[![version][version-image]][version-url]\n[![license][license-image]][license-url]\n[![size][size-image]][size-url]\n[![download][download-image]][download-url]\n\n## installation\n```bash\nnpm install -S @jswork/next-sanitize-filename\n```\n\n## usage\n```js\nimport '@jswork/next-sanitize-filename';\n\nconst str = '牛津英语(牛津上海版)1A(一年级上册)(2007年08月第1版)';\nnx.sanitizeFilename(str, {\n  items: [\n    [/\\(/g, '_'],\n    [/\\)/g, '_'],\n  ]\n});\n// 牛津英语_牛津上海版_1A_一年级上册__2007年08月第1版_\n```\n\n## license\nCode released under [the MIT license](https://github.com/afeiship/next-sanitize-filename/blob/master/LICENSE.txt).\n\n[version-image]: https://img.shields.io/npm/v/@jswork/next-sanitize-filename\n[version-url]: https://npmjs.org/package/@jswork/next-sanitize-filename\n\n[license-image]: https://img.shields.io/npm/l/@jswork/next-sanitize-filename\n[license-url]: https://github.com/afeiship/next-sanitize-filename/blob/master/LICENSE.txt\n\n[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-sanitize-filename\n[size-url]: https://github.com/afeiship/next-sanitize-filename/blob/master/dist/next-sanitize-filename.min.js\n\n[download-image]: https://img.shields.io/npm/dm/@jswork/next-sanitize-filename\n[download-url]: https://www.npmjs.com/package/@jswork/next-sanitize-filename\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-sanitize-filename","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafeiship%2Fnext-sanitize-filename","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafeiship%2Fnext-sanitize-filename/lists"}