$
This commit is contained in:
11
node_modules/@riotjs/parser/src/utils/exec-from-pos.js
generated
vendored
Normal file
11
node_modules/@riotjs/parser/src/utils/exec-from-pos.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Run RegExp.exec starting from a specific position
|
||||
* @param {RegExp} re - regex
|
||||
* @param {number} pos - last index position
|
||||
* @param {string} string - regex target
|
||||
* @returns {Array} regex result
|
||||
*/
|
||||
export default function execFromPos(re, pos, string) {
|
||||
re.lastIndex = pos
|
||||
return re.exec(string)
|
||||
}
|
Reference in New Issue
Block a user