.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / execall / index.js
1 'use strict';
2 var cloneRegexp = require('clone-regexp');
3
4 module.exports = function (input, str) {
5         var match;
6         var matches = [];
7         var re = cloneRegexp(input);
8         var isGlobal = re.global;
9
10         while (match = re.exec(str)) {
11                 matches.push({
12                         match: match[0],
13                         sub: match.slice(1),
14                         index: match.index
15                 })
16
17                 if (!isGlobal) {
18                         break;
19                 }
20         }
21
22         return matches;
23 };