Skip to content

Commit c8921f0

Browse files
committed
Add a README
1 parent cd130e0 commit c8921f0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# regexp-capture-interpolation
2+
3+
Interpolate regular expression captures and match variables (i.e. `$1`, `$&`) into a replacement string.
4+
5+
# Usage
6+
7+
```js
8+
var Interpolation = require('regexp-capture-interpolation');
9+
10+
Interpolation.interpolate(
11+
['key\tvalue', 'key', 'value', 0, 'key\tvalue\n'],
12+
'$1: $2,'
13+
); // returns "key: value,"
14+
```
15+

0 commit comments

Comments
 (0)