epiphany/node_modules/ends-with/benchmark/implementations/last-index-of.js
2023-12-09 22:48:07 -08:00

8 lines
174 B
JavaScript

'use strict';
var endsWith = module.exports = function(a, b) {
a = String(a);
b = String(b);
var i = a.lastIndexOf(b)
return i >= 0 && i === a.length - b.length;
};