# filename-converter

> Convert a invalid filename to a valid one with a self-defined mapping table. The key point is the mapping is reversible.

Latest version **1.0.0** (published 2017-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install filename-converter
pnpm add filename-converter
yarn add filename-converter
bun add filename-converter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-08-08 |
| First published | 2017-08-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.4.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maples7 |
| Maintainers | maples7 |

## Links

- npm: https://www.npmjs.com/package/filename-converter
- Repository: https://github.com/Maples7/filename-converter
- Homepage: https://github.com/Maples7/filename-converter#readme
- Issues: https://github.com/Maples7/filename-converter/issues
- npm.io page: https://npm.io/package/filename-converter

## Recent versions

- 1.0.0 (latest) — 2017-08-08

## README

# filename-converter

[![Build Status](https://travis-ci.org/Maples7/filename-converter.svg?branch=master)](https://travis-ci.org/Maples7/filename-converter)
[![Coverage Status](https://coveralls.io/repos/github/Maples7/filename-converter/badge.svg?branch=master)](https://coveralls.io/github/Maples7/filename-converter?branch=master)
[![npm version](https://badge.fury.io/js/filename-converter.svg)](https://badge.fury.io/js/filename-converter)           

[![NPM](https://nodei.co/npm/filename-converter.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/filename-converter/)
[![NPM](https://nodei.co/npm-dl/filename-converter.png?months=6&height=3)](https://nodei.co/npm/filename-converter/)

Convert an invalid filename to a valid one with a self-defined mapping table. The key point is the mapping is reversible.

## Invalid Characters

`/<>:"\|?*` is the current set of invalid characters, see [mapping_table.js](mapping_table.js) to get the mapping table.

## Usage

### Installation

```sh
npm i filename-converter
```

### Example

```js
const filenameConverter = require('filename-converter');

const filename = 'abc:de<.json';
const ret = filenameConverter.serialize(filename);
console.log(ret); // => abc@004de@002.json
console.log(filenameConverter.deserialize(ret)); // => abc:de<.json
```

## LICENSE

[MIT](LICENSE)

---
_Source: https://npm.io/package/filename-converter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
