@plexis/ends-with

0.0.22 • Public • Published

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

Package Sidebar

Install

npm i @plexis/ends-with

Weekly Downloads

1

Version

0.0.22

License

MIT

Unpacked Size

6.06 kB

Total Files

6

Last publish

Collaborators

  • vorillaz