Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function hasTrailingComma(tokens, terminator = tt.parenR) {
let state = {tokens: tokens};
return barf(state, terminator) && barf(state, tt.comma);
}