get-match-index.js 192 B

1234567
  1. "use strict";
  2. exports.__esModule = true;
  3. function getMatchIndex(text, regex) {
  4. var match = text.match(regex);
  5. return match ? match.index : -1;
  6. }
  7. exports.getMatchIndex = getMatchIndex;