mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
23
node_modules/execall/index.js
generated
vendored
Normal file
23
node_modules/execall/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
var cloneRegexp = require('clone-regexp');
|
||||
|
||||
module.exports = function (input, str) {
|
||||
var match;
|
||||
var matches = [];
|
||||
var re = cloneRegexp(input);
|
||||
var isGlobal = re.global;
|
||||
|
||||
while (match = re.exec(str)) {
|
||||
matches.push({
|
||||
match: match[0],
|
||||
sub: match.slice(1),
|
||||
index: match.index
|
||||
})
|
||||
|
||||
if (!isGlobal) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
};
|
||||
Reference in New Issue
Block a user