Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
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 to get the mapping table.
Usage
Installation
npm i filename-converter
Example
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

