function before({
    source,
    index,
    err,
    errTarget,
    lineCheckStr,
    onlyOneChar = false,
    allowIndentation = false
  }) {
    activeArgs = {
      source,
      index,
      err,
      errTarget,
      onlyOneChar,
      allowIndentation
    };

    switch (expectation) {
      case "always":
        expectBefore();
        break;
      case "never":
        rejectBefore();
        break;
      case "always-single-line":
        if (!isSingleLineString(lineCheckStr || source)) {
          return;
        }

        expectBefore(messages.expectedBeforeSingleLine);
        break;
      case "never-single-line":
        if (!isSingleLineString(lineCheckStr || source)) {
          return;
        }

        rejectBefore(messages.rejectedBeforeSingleLine);
        break;
      case "always-multi-line":
        if (isSingleLineString(lineCheckStr || source)) {
          return;
        }

        expectBefore(messages.expectedBeforeMultiLine);
        break;
      case "never-multi-line":
        if (isSingleLineString(lineCheckStr || source)) {
          return;
        }

        rejectBefore(messages.rejectedBeforeMultiLine);
        break;
      default:
        throw configurationError(`Unknown expectation "${expectation}"`);
    }
  }
Check for whitespace *before* a character.

@param {object} args - Named arguments object
@param {string} args.source - The source string
@param {number} args.index - The index of the character to check before
@param {function} args.err - If a violation is found, this callback
  will be invoked with the relevant warning message.
  Typically this callback will report() the violation.
@param {function} args.errTarget - If a violation is found, this string
  will be sent to the relevant warning message.
@param {string} [args.lineCheckStr] - Single- and multi-line checkers
  will use this string to determine whether they should proceed,
  i.e. if this string is one line only, single-line checkers will check,
  multi-line checkers will ignore.
  If none is passed, they will use `source`.
@param {boolean} [args.onlyOneChar=false] - Only check *one* character before.
  By default, "always-*" checks will look for the `targetWhitespace` one
  before and then ensure there is no whitespace two before. This option
  bypasses that second check.
@param {boolean} [args.allowIndentation=false] - Allow arbitrary indentation
  between the `targetWhitespace` (almost definitely a newline) and the `index`.
  With this option, the checker will see if a newline *begins* the whitespace before
  the `index`.