filename-converter
v1.0.0
Published
Convert a invalid filename to a valid one with a self-defined mapping table. The key point is the mapping is reversible.
Downloads
2
Readme
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@[email protected]
console.log(filenameConverter.deserialize(ret)); // => abc:de<.json