UNPKG

dicom-microscopy-viewer-changed

Version:
10 lines (8 loc) 269 B
function indexOfMatch(xml, pattern, startIndex) { const re = new RegExp(pattern); const match = re.exec(xml.slice(startIndex)); if (match) return startIndex + match.index; else return -1; } module.exports = indexOfMatch; module.exports.default = indexOfMatch;