Sanitize a string to be safe for use as a filename by customize list.
npm install -S @jswork/next-sanitize-filename
import '@jswork/next-sanitize-filename';
const str = '牛津英语(牛津上海版)1A(一年级上册)(2007年08月第1版)';
nx.sanitizeFilename(str, {
items: [
[/\(/g, '_'],
[/\)/g, '_'],
]
});
// 牛津英语_牛津上海版_1A_一年级上册__2007年08月第1版_
Code released under the MIT license.