{"id":20562180,"url":"https://github.com/ryoichi-obara/convert-filename-ja","last_synced_at":"2026-04-11T23:41:40.071Z","repository":{"id":32537354,"uuid":"136491267","full_name":"ryoichi-obara/convert-filename-ja","owner":"ryoichi-obara","description":"Convert a string to be able to use as a filename with Japanese characters.","archived":false,"fork":false,"pushed_at":"2023-01-03T15:16:26.000Z","size":889,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-16T02:31:39.049Z","etag":null,"topics":["ecmascript","hacktoberfest","japanese","japanese-characters","javascript","javascript-library","node","node-js","node-module","nodejs","nodejs-modules","remove-characters","string-manipulation"],"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/ryoichi-obara.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":"2018-06-07T14:45:10.000Z","updated_at":"2020-10-12T08:45:12.000Z","dependencies_parsed_at":"2023-01-14T21:31:48.763Z","dependency_job_id":null,"html_url":"https://github.com/ryoichi-obara/convert-filename-ja","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryoichi-obara%2Fconvert-filename-ja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryoichi-obara%2Fconvert-filename-ja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryoichi-obara%2Fconvert-filename-ja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryoichi-obara%2Fconvert-filename-ja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryoichi-obara","download_url":"https://codeload.github.com/ryoichi-obara/convert-filename-ja/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241646973,"owners_count":19996658,"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":["ecmascript","hacktoberfest","japanese","japanese-characters","javascript","javascript-library","node","node-js","node-module","nodejs","nodejs-modules","remove-characters","string-manipulation"],"created_at":"2024-11-16T04:09:31.672Z","updated_at":"2026-04-11T23:41:35.038Z","avatar_url":"https://github.com/ryoichi-obara.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# convert-filename-ja\n\n[![Build Status](https://travis-ci.org/ryoichi-obara/convert-filename-ja.svg?branch=master)](https://travis-ci.org/ryoichi-obara/convert-filename-ja)\n[![Coverage Status](https://coveralls.io/repos/github/ryoichi-obara/convert-filename-ja/badge.svg?branch=master)](https://coveralls.io/github/ryoichi-obara/convert-filename-ja?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/7161b91f3cc9ff507c7c/maintainability)](https://codeclimate.com/github/ryoichi-obara/convert-filename-ja/maintainability)\n[![npm version](https://badge.fury.io/js/convert-filename-ja.svg)](https://badge.fury.io/js/convert-filename-ja)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n\nConvert a string to be able to use as a filename with Japanese characters.\n\n## Install\n\n```\nnpm install convert-filename-ja\n```\n\n## Usage\n\n``convert`` returns a string to safe use for filename.\n\n* Remove control characters (0x00–0x1f and 0x80–0x9f)\n* Remove reserved filenames on UNIX/Windows\n  - '.'\n  - '..'\n  - 'con', 'prn', 'aux', 'nul'\n  - 'com1', 'com2', 'com3', 'com4', 'com5', 'com6', 'com7', 'com8', 'com9'\n  - 'lpt1', 'lpt2', 'lpt3', 'lpt4', 'lpt5', 'lpt6', 'lpt7', 'lpt8', 'lpt9'\n  - Remove prefix space and suffix space and dot\n* Convert reserved characters ( / ? \u003c \u003e ¥ \\ : * | \" ) to Japanese double byte characters.\n* Remove characters over 255\n\n```js\nconst converter = require('convert-filename-ja');\n\nconst parentDir         = converter.convert('..'); // ''\nconst convertDoublebyte = converter.convert('filename\u003c2018/06/08\u003e.txt.'); // 'filename＜2018／06／08＞.txt'\nconst nonProcessed      = converter.convert('filenme.txt'); // 'filename.txt'\n```\n\n## Refer\n\nhttps://github.com/parshap/node-sanitize-filename\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryoichi-obara%2Fconvert-filename-ja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryoichi-obara%2Fconvert-filename-ja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryoichi-obara%2Fconvert-filename-ja/lists"}