Module: js-whatever/js/string-ends-with

js-whatever/js/string-ends-with

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
string string

The string to test

suffices string | 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
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.