mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
forceTransformedStrings option
This commit is contained in:
@@ -3,6 +3,14 @@ import * as ESTree from 'estree';
|
||||
import { NodeGuards } from './NodeGuards';
|
||||
|
||||
export class NodeLiteralUtils {
|
||||
/**
|
||||
* @param {Literal} literalNode
|
||||
* @returns {literalNode is (SimpleLiteral & {value: string})}
|
||||
*/
|
||||
public static isStringLiteralNode (literalNode: ESTree.Literal): literalNode is ESTree.Literal & {value: string} {
|
||||
return typeof literalNode.value === 'string';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Literal} literalNode
|
||||
* @param {Node} parentNode
|
||||
|
||||
@@ -20,6 +20,14 @@ export class NodeMetadata {
|
||||
: undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Node} node
|
||||
* @returns {boolean}
|
||||
*/
|
||||
public static isForceObfuscatedNode (node: ESTree.Node): boolean {
|
||||
return NodeMetadata.get(node, 'forceObfuscatedNode') === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Node} node
|
||||
* @returns {boolean}
|
||||
|
||||
Reference in New Issue
Block a user