1.0.0 • Published 3 years ago

@jswork/next-array-replace v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

next-array-replace

Multiple replace for array.

version license size download

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.