lib/lbt/utils/ASTUtils.js
function isString(node, literal) {
	if ( node == null || node.type !== Syntax.Literal || typeof node.value !== "string" ) {
		return false;
	}
	return literal == null ? true : node.value === literal;
}
function isString(node, literal) {
	if ( node == null || node.type !== Syntax.Literal || typeof node.value !== "string" ) {
		return false;
	}
	return literal == null ? true : node.value === literal;
}
function isString ( node , literal ) { if ( node == null || node . type !== Syntax . Literal || typeof node . value !== "string" ) { return false ; } return literal == null ? true : node . value === literal ; }
Checks whether the given node is a string literal.

If second parameter 'literal' is given, the value of the node is additionally compared with that literal.

@private
@param {ESTree} node
@param {string} [literal]
@returns {boolean} Whether the node is a literal and whether its value matches the given string
Checks whether the given node is a string literal .