function isLiteral(node, opts) {
if (!node) return false;
const nodeType = node.type;
if ("StringLiteral" === nodeType ||
"NumericLiteral" === nodeType ||
"NullLiteral" === nodeType ||
"BooleanLiteral" === nodeType ||
"RegExpLiteral" === nodeType ||
"TemplateLiteral" === nodeType ||
"BigIntLiteral" === nodeType ||
"DecimalLiteral" === nodeType ||
nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
if (typeof opts === "undefined") {
return true;
} else {
return (0, _shallowEqual.default)(node, opts);
}
}
return false;
}