How to use the uglify-js-papandreou.AST_Constant function in uglify-js-papandreou

To help you get started, we’ve selected a few uglify-js-papandreou examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github assetgraph / assetgraph / lib / assets / JavaScript.js View on Github external
var tryFoldConstantToString = function (node) {
            if (node instanceof uglifyJs.AST_Constant) {
                return node;
            } else {
                var foldedNode = uglifyAst.foldConstant(node);
                if (foldedNode instanceof uglifyJs.AST_String) {
                    this.markDirty();
                    return foldedNode;
                } else {
                    return node;
                }
            }
        }.bind(this);