code: function read (value) {
      if (value instanceof RegExp) {
        var chars = source.slice(index)
        var match = chars.match(value)
        if (match) {
          index += match[0].length
          return match[0]
        }
      } else {
        if (source.indexOf(value, index) === index) {
          index += value.length
          return value
        }
      }
    }
docs: `value` can be a regexp or a string. If it is recognized, the matching source string is returned and the index is incremented. Otherwise `undefined` is returned.