function endsWith(subject, end, position) {
    if (isNil(end)) {
      return false;
    }

    var subjectString = coerceToString(subject);
    var endString = coerceToString(end);

    if (endString === '') {
      return true;
    }

    position = isNil(position) ? subjectString.length : clipNumber(toInteger(position), 0, subjectString.length);
    position -= endString.length;
    var lastIndex = subjectString.indexOf(endString, position);
    return lastIndex !== -1 && lastIndex === position;
  }
Checks whether `subject` ends with `end`.

@function endsWith
@static
@since 1.0.0
@memberOf Query
@param {string} [subject=''] The string to verify.
@param {string} end The ending string.
@param {number} [position=subject.length] Search within `subject` as if the string were only `position` long.
@return {boolean} Returns `true` if `subject` ends with `end` or `false` otherwise.
@example
v.endsWith('red alert', 'alert');
// => true

v.endsWith('metro south', 'metro');
// => false

v.endsWith('Murphy', 'ph', 5);
// => true