Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

ends-with

v4.17.11arrow_drop_down
v4.17.11
STATUS
Passing
DOWNLOADS
12
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
8 months ago
SIZE
2 KB
Checks if `string` ends with the given target string.
1 contributor
Use ends-with in your project ?
Copied
npm i @bit/lodash.lodash.ends-with
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
endsWith("abc", "c");
modifieddraft
chevron_left
chevron_right
endsWith (
string:string?,
target:string?,
position:number?
) : boolean

Checks if string ends with the given target string.

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

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

_.endsWith('abc', 'b', 2);
// => true
Arguments
string: string?

The string to inspect.

target: string?

The string to search for.

position: number?

The position to search up to.

Returns
boolean

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