Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// Append runtime options - key for runtime dictionary lookup
if (path.parentPath.node.arguments.length === 1) {
// Second param 'args' could be omitted sometimes. Use null here
path.parentPath.node.arguments.push(t.nullLiteral());
}
invariant(
path.parentPath.node.arguments.length === 2,
'Expecting options to be the third param',
);
let shiftedJsfbt;
let enumCount = 0;
if (this.opts.reactNativeMode) {
({shiftedJsfbt, enumCount} = shiftEnumsToTop(phrase.jsfbt));
}
if (enumCount > 0) {
path.parentPath.node.arguments.push(
t.ObjectExpression([
t.objectProperty(
t.identifier('ehk'), // enumHashKey
_buildEnumToHashKeyObjectExpression(
shiftedJsfbt,
phrase.desc,
enumCount,
),
),
]),
);
} else {