Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isIdentifierNameES6(id) {
var i, iz, ch, lowCh, check;
if (id.length === 0) {
return false;
}
check = code.isIdentifierStartES6;
for (i = 0, iz = id.length; i < iz; ++i) {
ch = id.charCodeAt(i);
if (55296 <= ch && ch <= 56319) {
++i;
if (i >= iz) {
return false;
}
lowCh = id.charCodeAt(i);
if (!(56320 <= lowCh && lowCh <= 57343)) {
return false;
}
ch = decodeUtf16(ch, lowCh);
}
if (!check(ch)) {
return false;
}