endsWith

String
since 3.0.0

Returns

boolean `true` if `string` ends with `target`, else `false`.

Checks if string ends with the given target string.

Example of Lodash _.endsWith

_.endsWith('abc', 'c');
// => true

_.endsWith('abc', 'b');
// => false

_.endsWith('abc', 'b', 2);
// => true