mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Apply even more let/const transforms.
This commit is contained in:
@@ -30,12 +30,12 @@ function endsWith(string, target, position) {
|
||||
string = toString(string);
|
||||
target = baseToString(target);
|
||||
|
||||
var length = string.length;
|
||||
const length = string.length;
|
||||
position = position === undefined
|
||||
? length
|
||||
: baseClamp(toInteger(position), 0, length);
|
||||
|
||||
var end = position;
|
||||
const end = position;
|
||||
position -= target.length;
|
||||
return position >= 0 && string.slice(position, end) == target;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user