- Source:
Methods
-
<inner> endsWith(string, suffices) → {boolean}
-
Tests if the given string ends with any of the given suffices. Provided as an underscore mixin
Parameters:
Name Type Description stringstring The string to test
sufficesstring | Array.<String> The suffices to test for
- Source:
Returns:
true if the given string ends with any of the given suffices, false otherwise
- Type
- boolean
Example
_.endsWith('hello world', 'world'); // returns true _.endsWith('hello world', 'hello'); // returns false _.endsWith('hello world', ['hello', 'world']); // returns true