1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.isSpace = void 0;
|
4 | /**
|
5 | * Checks if the character is a space.
|
6 | */
|
7 | function isSpace(ch) {
|
8 | var specialSpaces = [
|
9 | 0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200a, 0x202f,
|
10 | 0x205f, 0x3000, 0xfeff,
|
11 | ];
|
12 | /* istanbul ignore next */
|
13 | return (ch === 0x0a ||
|
14 | ch === 0x0d ||
|
15 | ch === 0x2028 ||
|
16 | ch === 0x2029 || // Line terminators
|
17 | // White spaces
|
18 | ch === 0x20 ||
|
19 | ch === 0x09 ||
|
20 | ch === 0x0b ||
|
21 | ch === 0x0c ||
|
22 | ch === 0xa0 ||
|
23 | (ch >= 0x1680 && specialSpaces.includes(ch)));
|
24 | }
|
25 | exports.isSpace = isSpace;
|
26 | //# sourceMappingURL=is-space.js.map |
\ | No newline at end of file |