File size: 670 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWhitespace = isWhitespace;
exports.isNotWhitespace = isNotWhitespace;
/**
 * Check whether the given token is a whitespace.
 */
function isWhitespace(token) {
    return (token != null &&
        ((token.type === 'HTMLText' && !token.value.trim()) ||
            (token.type === 'JSXText' && !token.value.trim())));
}
/**
 * Check whether the given token is a not whitespace.
 */
function isNotWhitespace(token) {
    return (token != null &&
        (token.type !== 'HTMLText' || Boolean(token.value.trim())) &&
        (token.type !== 'JSXText' || Boolean(token.value.trim())));
}