millermedeiros/amd-utils — Issue #15: add string/batchReplace()
Author: millermedeiros
Created: 2011-11-23 14:44:30+00:00
State: open
Labels: feature

create a separate method that abstracts batch replacements since it can be useful for cases like HTML entities encode/decode...

so instead of coding:

```js
str = str
.replace(/\s+/g, '-')
.replace(/foo/g, 'bar')
...
```

it could be written as:

```js
var replacements = [
[/\s+/g, '-'],
[/foo/g, 'bar']
];
str = batchReplace(str, replacements);
```

see #14