UNPKG

980 BJavaScriptView Raw
1"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _charcodes = require('./charcodes');
2
3// https://tc39.github.io/ecma262/#sec-white-space
4 const WHITESPACE_CHARS = [
5 0x0009,
6 0x000b,
7 0x000c,
8 _charcodes.charCodes.space,
9 _charcodes.charCodes.nonBreakingSpace,
10 _charcodes.charCodes.oghamSpaceMark,
11 0x2000, // EN QUAD
12 0x2001, // EM QUAD
13 0x2002, // EN SPACE
14 0x2003, // EM SPACE
15 0x2004, // THREE-PER-EM SPACE
16 0x2005, // FOUR-PER-EM SPACE
17 0x2006, // SIX-PER-EM SPACE
18 0x2007, // FIGURE SPACE
19 0x2008, // PUNCTUATION SPACE
20 0x2009, // THIN SPACE
21 0x200a, // HAIR SPACE
22 0x202f, // NARROW NO-BREAK SPACE
23 0x205f, // MEDIUM MATHEMATICAL SPACE
24 0x3000, // IDEOGRAPHIC SPACE
25 0xfeff, // ZERO WIDTH NO-BREAK SPACE
26]; exports.WHITESPACE_CHARS = WHITESPACE_CHARS;
27
28 const IS_WHITESPACE = new Uint8Array(65536); exports.IS_WHITESPACE = IS_WHITESPACE;
29for (const char of exports.WHITESPACE_CHARS) {
30 exports.IS_WHITESPACE[char] = 1;
31}