UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

12 lines (10 loc) 244 B
function endsWith(str, target, position) { if (str == null || target == null) { return false; } if (position == null) { position = str.length; } return str.endsWith(target, position); } export { endsWith };