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
trusty-cms-4.3.2 node_modules/json5/lib/util.js
trusty-cms-4.3.1 node_modules/json5/lib/util.js
trusty-cms-4.3 node_modules/json5/lib/util.js
trusty-cms-4.2.3 node_modules/json5/lib/util.js
tang-0.2.1 spec/tang_app/node_modules/json5/lib/util.js
trusty-cms-4.2.2 node_modules/json5/lib/util.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/json5/lib/util.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/json5/lib/util.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/json5/lib/util.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/json5/lib/util.js
trusty-cms-4.2.1 node_modules/json5/lib/util.js
trusty-cms-4.2 node_modules/json5/lib/util.js
trusty-cms-4.1.9 node_modules/json5/lib/util.js
trusty-cms-4.1.8 node_modules/json5/lib/util.js
tang-0.2.0 spec/tang_app/node_modules/json5/lib/util.js
trusty-cms-4.1.7 node_modules/json5/lib/util.js
tang-0.1.0 spec/tang_app/node_modules/json5/lib/util.js
tang-0.0.9 spec/tang_app/node_modules/json5/lib/util.js
trusty-cms-4.1.6 node_modules/json5/lib/util.js
trusty-cms-4.1.5 node_modules/json5/lib/util.js