<commit_before>Escodegen ([escodegen](http://github.com/Constellation/escodegen)) is
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript))
code generator from [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST.

Escodegen can be used in a web browser:

    <script src="escodegen.js"></script>

or in a Node.js application via the package manager:

    npm install escodegen


simple example:

    escodegen.generate({
        type: 'BinaryExpression',
        operator: '+',
        left: { type: 'Literal', value: 40 },
        right: { type: 'Literal', value: 2 }
    });

and gets following string

    40 + 2


See [API page](https://github.com/Constellation/escodegen/wiki/API) for options.<commit_msg>Add link to demo to README<commit_after>Escodegen ([escodegen](http://github.com/Constellation/escodegen)) is
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript))
code generator from [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST.

Escodegen can be used in a web browser:

    <script src="escodegen.js"></script>

or in a Node.js application via the package manager:

    npm install escodegen


simple example:

    escodegen.generate({
        type: 'BinaryExpression',
        operator: '+',
        left: { type: 'Literal', value: 40 },
        right: { type: 'Literal', value: 2 }
    });

and gets following string

    40 + 2


See [API page](https://github.com/Constellation/escodegen/wiki/API) for options.
And see [online generator demo](http://constellation.github.com/demo/codegen/codegen.html).
{'fraction_non_alphanumeric': 0.13583655438983988, 'fraction_numerical': 0.009939260077305357, 'mean_word_length': 3.9239130434782608, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6105150', 'n_tokens_mistral': 592, 'n_tokens_neox': 548, 'n_words': 137}