message: Fix compatibility with IE11 by removing `findIndex` from the code (closes
diff: @@ -4,7 +4,9 @@ export default function buildMatchFn (args) {
  var options = dirtyOptions || {}
  var width = options.width
  - var matchPattern = (width && args.matchPatterns[width]) || args.matchPatterns[args.defaultMatchWidth]
  + var matchPattern =
  + (width && args.matchPatterns[width]) ||
  + args.matchPatterns[args.defaultMatchWidth]
  var matchResult = string.match(matchPattern)
  if (!matchResult) {
  @@ -12,11 +14,13 @@ export default function buildMatchFn (args) {
  }
  var matchedString = matchResult[0]
  - var parsePatterns = (width && args.parsePatterns[width]) || args.parsePatterns[args.defaultParseWidth]
  + var parsePatterns =
  + (width && args.parsePatterns[width]) ||
  + args.parsePatterns[args.defaultParseWidth]
  var value
  if (Object.prototype.toString.call(parsePatterns) === '[object Array]') {
  - value = parsePatterns.findIndex(function (pattern) {
  + value = findIndex(parsePatterns, function(pattern) {
  return pattern.test(string)
  })
  } else {
  @@ -42,3 +46,11 @@ function findKey (object, predicate) {
  }
  }
  }
  +
  +function findIndex(array, predicate) {
  + for (var key = 0; key < array.length; key++) {
  + if (predicate(array[key])) {
  + return key
  + }
  + }
  +}
  