1.0.2 • Published 4 years ago
@feizheng/next-array-replace v1.0.2
next-array-replace
Multiple replace for array.
installation
npm install -S @feizheng/next-array-replace
usage
import '@feizheng/next-array-replace';
const arr= [
[/a/g,'A'],
['hello','world']
];
const str = 'aaa-bbb-1234 hello Fei!';
const res = nx.arrayReplace( str, arr);
// AAA-bbb-1234 world Fei!