@plexis/ends-with
v0.0.22
Published
Checks whether the input text ends with the given pattern
Downloads
6
Maintainers
Readme
endsWith
Checks whether the input text ends with the given pattern
npm i @plexis/ends-with
Usage
import endsWith from '@plexis/ends-with';
const txt = 'This is me';
endsWith(txt, 'is me'); // true
endsWith(txt, 'is m', txt.length - 1); // true
endsWith(txt, 'is m', txt.length); // false
endsWith(txt, 'Foo'); // false