1.0.0 • Published 3 years ago
@jswork/next-array-replace v1.0.0
next-array-replace
Multiple replace for array.
installation
npm install -S @jswork/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!
license
Code released under the MIT license.
1.0.0
3 years ago