Apply more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-08 23:38:19 -08:00
parent ca9e6fa087
commit 4d0c15b49e
115 changed files with 621 additions and 613 deletions

10
trim.js
View File

@@ -6,7 +6,7 @@ import stringToArray from './_stringToArray.js';
import toString from './toString.js';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
const reTrim = /^\s+|\s+$/g;
/**
* Removes leading and trailing whitespace or specified characters from `string`.
@@ -38,10 +38,10 @@ function trim(string, chars, guard) {
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
chrSymbols = stringToArray(chars),
start = charsStartIndex(strSymbols, chrSymbols),
end = charsEndIndex(strSymbols, chrSymbols) + 1;
const strSymbols = stringToArray(string);
const chrSymbols = stringToArray(chars);
const start = charsStartIndex(strSymbols, chrSymbols);
const end = charsEndIndex(strSymbols, chrSymbols) + 1;
return castSlice(strSymbols, start, end).join('');
}