API Reference

Returns a boolean of whether or not the first string ends with a specific suffix or one of several suffixes

function endsWith(str: string, suffix: string | string[]): boolean

// Example:

endsWith("hello world", "rld") //=> true

endsWith("hello world", ["sdf", "rld"]) //=> true