Rename isWhitespace to isSpace.

This commit is contained in:
John-David Dalton
2014-12-21 23:08:54 -06:00
parent 562834e0d0
commit 06bfbfaff4

View File

@@ -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;
}