<commit_before>SandboxJS
=========
### JavaScript "Sandboxes" for the web browser.

This script offers a very simple interface for JavaScript "Sandboxes".
Underneath, it uses the [magic power of `iframe`s][DeanEdwards] to create
new execution scopes for JavaScript to be evaluated inside of.

This could potentially be used as the backbone for browser-side:

 * Isolated scope module loading (could implement CommonJS on top of this).
 * Client-side HTML templates, with access to certain defined variables.
 * Defining custom JavaScript environments (APIs), then loading external
   _script_ files that interact with the custom API (abstracting the browser/DOM away).


API
---

    new Sandbox() -> sandbox

Creates and returns new `Sandbox` instance.

    sandbox.global -> Global

The `global` scope of the sandbox instance. This is a convenient way
to share instances of `Object`s across scopes, or prepare the sandbox
environment with properties that scripts can use.

    sandbox.eval(jsStr:String) -> ?

Calls `eval` on the given `String` inside the sandbox. Variables declared
inside the sandbox won't be accessible globally, and global variables won't
be visible inside the sandbox. The result of the `eval` is returned.<commit_msg>Document the 'bare' parameter in the Sandbox constructor.<commit_after>SandboxJS
=========
### JavaScript "Sandboxes" for the web browser.

This script offers a very simple interface for JavaScript "Sandboxes".
Underneath, it uses the [magic power of `iframe`s][DeanEdwards] to create
new execution scopes for JavaScript to be evaluated inside of.

This could potentially be used as the backbone for browser-side:

 * Isolated scope module loading (could implement CommonJS on top of this).
 * Client-side HTML templates, with access to certain defined variables.
 * Defining custom JavaScript environments (APIs), then loading external
   _script_ files that interact with the custom API (abstracting the browser/DOM away).


API
---

    new Sandbox([bare:Boolean]) -> sandbox

Creates and returns new `Sandbox` instance. The `bare` parameter
defaults to _true_, and determines whether or not the sandbox environment
should attempt to have all it's extraneous browser/DOM objects removed from
the scope. Setting this to _false_ will keep functions like `alert`, and
`XMLHttpRequest` available for use inside the sandbox.

    sandbox.global -> Global

The `global` scope of the sandbox instance. This is a convenient way
to share instances of `Object`s across scopes, or prepare the sandbox
environment with properties that scripts can use.

    sandbox.eval(jsStr:String) -> ?

Calls `eval` on the given `String` inside the sandbox. Variables declared
inside the sandbox won't be accessible globally, and global variables won't
be visible inside the sandbox. The result of the `eval` is returned.
{'fraction_non_alphanumeric': 0.06687785990848293, 'fraction_numerical': 0.0, 'mean_word_length': 4.616600790513834, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3762775', 'n_tokens_mistral': 736, 'n_tokens_neox': 693, 'n_words': 378}