How to use the esutils/lib/code.isIdentifierPartES5 function in esutils

To help you get started, we’ve selected a few esutils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stealjs / steal / ext / babel-code-frame.js View on Github external
function isIdentifierNameES5(id) {
            var i, iz, ch;
            if (id.length === 0) {
                return false;
            }
            ch = id.charCodeAt(0);
            if (!code.isIdentifierStartES5(ch)) {
                return false;
            }
            for (i = 1, iz = id.length; i < iz; ++i) {
                ch = id.charCodeAt(i);
                if (!code.isIdentifierPartES5(ch)) {
                    return false;
                }
            }
            return true;
        }
        function decodeUtf16(lead, trail) {