Bakhtina Sofya b84cb877be 1st comm | 3 tygodni temu | |
---|---|---|
.. | ||
index.js | 3 tygodni temu | |
license | 3 tygodni temu | |
package.json | 3 tygodni temu | |
readme.md | 3 tygodni temu |
Convert a string to a valid safe filename
On Unix-like systems /
is reserved and <>:"/\|?*
on Windows.
$ npm install filenamify
const filenamify = require('filenamify');
filenamify('<foo/bar>');
//=> 'foo!bar'
filenamify('foo:"bar"', {replacement: '🐴'});
//=> 'foo🐴bar'
Accepts a filename and returns a valid filename.
Accepts a path and returns the path with a valid filename.
Type: string
Type: string
Default: '!'
String to use as replacement for reserved filename characters.
Cannot contain: <
>
:
"
/
\
|
?
*
MIT © Sindre Sorhus