// @flow /** * Check if a string ends with something * @private */ export default function endsWith(string: string, suffix: string): boolean { return string.substr(-suffix.length) === suffix }