Sha256: 2a72dabfd1dc982a11749b561809de1e4eb1f47a5baa17520633693bbce4679d

Contents?: true

Size: 885 Bytes

Versions: 101

Compression:

Stored size: 885 Bytes

Contents

const unicode = require('../lib/unicode')

module.exports = {
    isSpaceSeparator (c) {
        return typeof c === 'string' && unicode.Space_Separator.test(c)
    },

    isIdStartChar (c) {
        return typeof c === 'string' && (
            (c >= 'a' && c <= 'z') ||
        (c >= 'A' && c <= 'Z') ||
        (c === '$') || (c === '_') ||
        unicode.ID_Start.test(c)
        )
    },

    isIdContinueChar (c) {
        return typeof c === 'string' && (
            (c >= 'a' && c <= 'z') ||
        (c >= 'A' && c <= 'Z') ||
        (c >= '0' && c <= '9') ||
        (c === '$') || (c === '_') ||
        (c === '\u200C') || (c === '\u200D') ||
        unicode.ID_Continue.test(c)
        )
    },

    isDigit (c) {
        return typeof c === 'string' && /[0-9]/.test(c)
    },

    isHexDigit (c) {
        return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)
    },
}

Version data entries

101 entries across 76 versions & 9 rubygems

Version Path
immosquare-cleaner-0.1.62 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.61 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.60 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.59 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.58 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.57 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.56 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.55 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.54 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.53 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.52 node_modules/json5/lib/util.js
trusty-cms-6.3.1 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.51 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.50 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.49 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.48 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.47 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.46 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.45 node_modules/json5/lib/util.js
immosquare-cleaner-0.1.44 node_modules/json5/lib/util.js