UNPKG

11.2 kBJavaScriptView Raw
1/*!
2{
3 "author": "Graham Fairweather",
4 "copywrite": "Copyright (c) 2015-present",
5 "date": "2019-08-28T16:43:31.244Z",
6 "describe": "",
7 "description": "List of ECMAScript white space characters.",
8 "file": "white-space-x.js",
9 "hash": "0c8e0655021dfc71419b",
10 "license": "MIT",
11 "version": "4.1.1"
12}
13*/
14(function webpackUniversalModuleDefinition(root, factory) {
15 if(typeof exports === 'object' && typeof module === 'object')
16 module.exports = factory();
17 else if(typeof define === 'function' && define.amd)
18 define([], factory);
19 else if(typeof exports === 'object')
20 exports["whiteSpaceX"] = factory();
21 else
22 root["whiteSpaceX"] = factory();
23})((function () {
24 'use strict';
25
26 var ObjectCtr = {}.constructor;
27 var objectPrototype = ObjectCtr.prototype;
28 var defineProperty = ObjectCtr.defineProperty;
29 var $globalThis;
30 var getGlobalFallback = function() {
31 if (typeof self !== 'undefined') {
32 return self;
33 }
34
35 if (typeof window !== 'undefined') {
36 return window;
37 }
38
39 if (typeof global !== 'undefined') {
40 return global;
41 }
42
43 return void 0;
44 };
45
46 var returnThis = function() {
47 return this;
48 };
49
50 try {
51 if (defineProperty) {
52 defineProperty(objectPrototype, '$$globalThis$$', {
53 get: returnThis,
54 configurable: true
55 });
56 } else {
57 objectPrototype.__defineGetter__('$$globalThis$$', returnThis);
58 }
59
60 $globalThis = typeof $$globalThis$$ === 'undefined' ? getGlobalFallback() : $$globalThis$$;
61
62 delete objectPrototype.$$globalThis$$;
63
64 return $globalThis;
65 } catch (error) {
66 return getGlobalFallback();
67 }
68}()), function() {
69return /******/ (function(modules) { // webpackBootstrap
70/******/ // The module cache
71/******/ var installedModules = {};
72/******/
73/******/ // The require function
74/******/ function __webpack_require__(moduleId) {
75/******/
76/******/ // Check if module is in cache
77/******/ if(installedModules[moduleId]) {
78/******/ return installedModules[moduleId].exports;
79/******/ }
80/******/ // Create a new module (and put it into the cache)
81/******/ var module = installedModules[moduleId] = {
82/******/ i: moduleId,
83/******/ l: false,
84/******/ exports: {}
85/******/ };
86/******/
87/******/ // Execute the module function
88/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
89/******/
90/******/ // Flag the module as loaded
91/******/ module.l = true;
92/******/
93/******/ // Return the exports of the module
94/******/ return module.exports;
95/******/ }
96/******/
97/******/
98/******/ // expose the modules object (__webpack_modules__)
99/******/ __webpack_require__.m = modules;
100/******/
101/******/ // expose the module cache
102/******/ __webpack_require__.c = installedModules;
103/******/
104/******/ // define getter function for harmony exports
105/******/ __webpack_require__.d = function(exports, name, getter) {
106/******/ if(!__webpack_require__.o(exports, name)) {
107/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
108/******/ }
109/******/ };
110/******/
111/******/ // define __esModule on exports
112/******/ __webpack_require__.r = function(exports) {
113/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
114/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
115/******/ }
116/******/ Object.defineProperty(exports, '__esModule', { value: true });
117/******/ };
118/******/
119/******/ // create a fake namespace object
120/******/ // mode & 1: value is a module id, require it
121/******/ // mode & 2: merge all properties of value into the ns
122/******/ // mode & 4: return value when already ns object
123/******/ // mode & 8|1: behave like require
124/******/ __webpack_require__.t = function(value, mode) {
125/******/ if(mode & 1) value = __webpack_require__(value);
126/******/ if(mode & 8) return value;
127/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
128/******/ var ns = Object.create(null);
129/******/ __webpack_require__.r(ns);
130/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
131/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
132/******/ return ns;
133/******/ };
134/******/
135/******/ // getDefaultExport function for compatibility with non-harmony modules
136/******/ __webpack_require__.n = function(module) {
137/******/ var getter = module && module.__esModule ?
138/******/ function getDefault() { return module['default']; } :
139/******/ function getModuleExports() { return module; };
140/******/ __webpack_require__.d(getter, 'a', getter);
141/******/ return getter;
142/******/ };
143/******/
144/******/ // Object.prototype.hasOwnProperty.call
145/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
146/******/
147/******/ // __webpack_public_path__
148/******/ __webpack_require__.p = "";
149/******/
150/******/
151/******/ // Load entry module and return exports
152/******/ return __webpack_require__(__webpack_require__.s = 0);
153/******/ })
154/************************************************************************/
155/******/ ([
156/* 0 */
157/***/ (function(module, __webpack_exports__, __webpack_require__) {
158
159"use strict";
160__webpack_require__.r(__webpack_exports__);
161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "list", function() { return list; });
162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "string2016", function() { return string2016; });
163/**
164 * A record of a white space character.
165 *
166 * @typedef {object} CharRecord
167 * @property {number} code - The character code.
168 * @property {string} description - A description of the character.
169 * @property {boolean} es5 - Whether the spec lists this as a white space.
170 * @property {boolean} es2015 - Whether the spec lists this as a white space.
171 * @property {boolean} es2016 - Whether the spec lists this as a white space.
172 * @property {boolean} es2017 - Whether the spec lists this as a white space.
173 * @property {boolean} es2018 - Whether the spec lists this as a white space.
174 * @property {string} string - The character string.
175 */
176
177/**
178 * An array of the whitespace char codes, string, descriptions and language
179 * presence in the specifications.
180 *
181 * @type Array.<CharRecord>
182 */
183var list = [{
184 code: 0x0009,
185 description: 'Tab',
186 es5: true,
187 es2015: true,
188 es2016: true,
189 es2017: true,
190 es2018: true,
191 string: "\t"
192}, {
193 code: 0x000a,
194 description: 'Line Feed',
195 es5: true,
196 es2015: true,
197 es2016: true,
198 es2017: true,
199 es2018: true,
200 string: "\n"
201}, {
202 code: 0x000b,
203 description: 'Vertical Tab',
204 es5: true,
205 es2015: true,
206 es2016: true,
207 es2017: true,
208 es2018: true,
209 string: "\x0B"
210}, {
211 code: 0x000c,
212 description: 'Form Feed',
213 es5: true,
214 es2015: true,
215 es2016: true,
216 es2017: true,
217 es2018: true,
218 string: "\f"
219}, {
220 code: 0x000d,
221 description: 'Carriage Return',
222 es5: true,
223 es2015: true,
224 es2016: true,
225 es2017: true,
226 es2018: true,
227 string: "\r"
228}, {
229 code: 0x0020,
230 description: 'Space',
231 es5: true,
232 es2015: true,
233 es2016: true,
234 es2017: true,
235 es2018: true,
236 string: " "
237},
238/*
239{
240 code: 0x0085,
241 description: 'Next line',
242 es5: false,
243 es2015: false,
244 es2016: false,
245 es2017: false,
246 es2018: false,
247 string: '\u0085'
248}
249*/
250{
251 code: 0x00a0,
252 description: 'No-break space',
253 es5: true,
254 es2015: true,
255 es2016: true,
256 es2017: true,
257 es2018: true,
258 string: "\xA0"
259}, {
260 code: 0x1680,
261 description: 'Ogham space mark',
262 es5: true,
263 es2015: true,
264 es2016: true,
265 es2017: true,
266 es2018: true,
267 string: "\u1680"
268}, {
269 code: 0x180e,
270 description: 'Mongolian vowel separator',
271 es5: true,
272 es2015: true,
273 es2016: true,
274 es2017: false,
275 es2018: false,
276 string: "\u180E"
277}, {
278 code: 0x2000,
279 description: 'En quad',
280 es5: true,
281 es2015: true,
282 es2016: true,
283 es2017: true,
284 es2018: true,
285 string: "\u2000"
286}, {
287 code: 0x2001,
288 description: 'Em quad',
289 es5: true,
290 es2015: true,
291 es2016: true,
292 es2017: true,
293 es2018: true,
294 string: "\u2001"
295}, {
296 code: 0x2002,
297 description: 'En space',
298 es5: true,
299 es2015: true,
300 es2016: true,
301 es2017: true,
302 es2018: true,
303 string: "\u2002"
304}, {
305 code: 0x2003,
306 description: 'Em space',
307 es5: true,
308 es2015: true,
309 es2016: true,
310 es2017: true,
311 es2018: true,
312 string: "\u2003"
313}, {
314 code: 0x2004,
315 description: 'Three-per-em space',
316 es5: true,
317 es2015: true,
318 es2016: true,
319 es2017: true,
320 es2018: true,
321 string: "\u2004"
322}, {
323 code: 0x2005,
324 description: 'Four-per-em space',
325 es5: true,
326 es2015: true,
327 es2016: true,
328 es2017: true,
329 es2018: true,
330 string: "\u2005"
331}, {
332 code: 0x2006,
333 description: 'Six-per-em space',
334 es5: true,
335 es2015: true,
336 es2016: true,
337 es2017: true,
338 es2018: true,
339 string: "\u2006"
340}, {
341 code: 0x2007,
342 description: 'Figure space',
343 es5: true,
344 es2015: true,
345 es2016: true,
346 es2017: true,
347 es2018: true,
348 string: "\u2007"
349}, {
350 code: 0x2008,
351 description: 'Punctuation space',
352 es5: true,
353 es2015: true,
354 es2016: true,
355 es2017: true,
356 es2018: true,
357 string: "\u2008"
358}, {
359 code: 0x2009,
360 description: 'Thin space',
361 es5: true,
362 es2015: true,
363 es2016: true,
364 es2017: true,
365 es2018: true,
366 string: "\u2009"
367}, {
368 code: 0x200a,
369 description: 'Hair space',
370 es5: true,
371 es2015: true,
372 es2016: true,
373 es2017: true,
374 es2018: true,
375 string: "\u200A"
376},
377/*
378{
379 code: 0x200b,
380 description: 'Zero width space',
381 es5: false,
382 es2015: false,
383 es2016: false,
384 es2017: false,
385 es2018: false,
386 string: '\u200b'
387},
388*/
389{
390 code: 0x2028,
391 description: 'Line separator',
392 es5: true,
393 es2015: true,
394 es2016: true,
395 es2017: true,
396 es2018: true,
397 string: "\u2028"
398}, {
399 code: 0x2029,
400 description: 'Paragraph separator',
401 es5: true,
402 es2015: true,
403 es2016: true,
404 es2017: true,
405 es2018: true,
406 string: "\u2029"
407}, {
408 code: 0x202f,
409 description: 'Narrow no-break space',
410 es5: true,
411 es2015: true,
412 es2016: true,
413 es2017: true,
414 es2018: true,
415 string: "\u202F"
416}, {
417 code: 0x205f,
418 description: 'Medium mathematical space',
419 es5: true,
420 es2015: true,
421 es2016: true,
422 es2017: true,
423 es2018: true,
424 string: "\u205F"
425}, {
426 code: 0x3000,
427 description: 'Ideographic space',
428 es5: true,
429 es2015: true,
430 es2016: true,
431 es2017: true,
432 es2018: true,
433 string: "\u3000"
434}, {
435 code: 0xfeff,
436 description: 'Byte Order Mark',
437 es5: true,
438 es2015: true,
439 es2016: true,
440 es2017: true,
441 es2018: true,
442 string: "\uFEFF"
443}];
444/**
445 * A string of the ES5 to ES2016 whitespace characters.
446 *
447 * @type string
448 */
449
450var stringES2016 = '';
451/**
452 * A string of the ES2017 to ES2018 whitespace characters.
453 *
454 * @type string
455 */
456
457var stringES2018 = '';
458var length = list.length;
459
460for (var i = 0; i < length; i += 1) {
461 if (list[i].es2016) {
462 stringES2016 += list[i].string;
463 }
464
465 if (list[i].es2018) {
466 stringES2018 += list[i].string;
467 }
468}
469
470var string2018 = stringES2018;
471/* harmony default export */ __webpack_exports__["default"] = (string2018);
472var string2016 = stringES2016;
473
474
475
476/***/ })
477/******/ ]);
478});
479//# sourceMappingURL=white-space-x.js.map
\No newline at end of file