This commit is contained in:
9
node_modules/xml-utils/index-of-match-end.js
generated
vendored
Normal file
9
node_modules/xml-utils/index-of-match-end.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
function indexOfMatchEnd(xml, pattern, startIndex) {
|
||||
const re = new RegExp(pattern);
|
||||
const match = re.exec(xml.slice(startIndex));
|
||||
if (match) return startIndex + match.index + match[0].length - 1;
|
||||
else return -1;
|
||||
}
|
||||
|
||||
module.exports = indexOfMatchEnd;
|
||||
module.exports.default = indexOfMatchEnd;
|
||||
Reference in New Issue
Block a user