mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
639 B
15 lines
639 B
10 years ago
|
/**
|
||
|
* Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a
|
||
|
* character code is whitespace.
|
||
|
*
|
||
|
* @private
|
||
|
* @param {number} charCode The character code to inspect.
|
||
|
* @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`.
|
||
|
*/
|
||
|
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)));
|
||
|
}
|
||
|
|
||
|
module.exports = isSpace;
|