mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Rename isWhitespace to isSpace.
This commit is contained in:
@@ -744,7 +744,7 @@
|
||||
* @param {number} charCode The character code to inspect.
|
||||
* @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.
|
||||
*/
|
||||
function isWhitespace(charCode) {
|
||||
function isSpace(charCode) {
|
||||
return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 ||
|
||||
(charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279)));
|
||||
}
|
||||
@@ -813,7 +813,7 @@
|
||||
var index = -1,
|
||||
length = string.length;
|
||||
|
||||
while (++index < length && isWhitespace(string.charCodeAt(index))) {}
|
||||
while (++index < length && isSpace(string.charCodeAt(index))) {}
|
||||
return index;
|
||||
}
|
||||
|
||||
@@ -828,7 +828,7 @@
|
||||
function trimmedRightIndex(string) {
|
||||
var index = string.length;
|
||||
|
||||
while (index-- && isWhitespace(string.charCodeAt(index))) {}
|
||||
while (index-- && isSpace(string.charCodeAt(index))) {}
|
||||
return index;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user