.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / execall / readme.md
1 # execall [![Build Status](https://travis-ci.org/sindresorhus/execall.svg?branch=master)](https://travis-ci.org/sindresorhus/execall)
2
3 > Find multiple RegExp matches in a string
4
5 Instead of having to iterate over `RegExp#exec`, immutable, and with a nicer result format.
6
7
8 ## Install
9
10 ```
11 $ npm install --save execall
12 ```
13
14
15 ## Usage
16
17 ```js
18 var execall = require('execall');
19
20 execall(/(\d+)/g, '$200 and $400');
21 /*
22 [
23         {
24                 match: '200',
25                 sub: ['200'],
26                 index: 1
27         },
28         {
29                 match: '400',
30                 sub: ['400'],
31                 index: 10
32         }
33 ]
34 */
35 ```
36
37
38 ## API
39
40 ### execall(re, input)
41
42 Returns an array of objects with a match, sub-matches, and index.
43
44 #### re
45
46 Type: `regexp`
47
48 Regular expression to match against the `input`.
49
50 #### input
51
52 Type: `string`
53
54
55 ## License
56
57 MIT © [Sindre Sorhus](http://sindresorhus.com)