<commit_before>Getting Started
===============

[CJS](http://wiki.commonjs.org/wiki/CommonJS) and [AMD](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) are the primary targets for `when`, but instructions for a variety of setups are provided below.

#### AMD

1. Get it. `bower install when`, `yeoman install when`, or `git clone https://github.com/cujojs/when`

1. Configure your loader. When.js is AMD-compatible out of the box need for shims or anything. Below is an example of how configuring the package might look:

  ```js
  // using requirejs
  requirejs.config({
    packages: [
      { name: 'when', location: '/path/to/when', main: 'when' }
    ]
  });

  // using curl.js
  curl.config({
    packages: {
      when: { location: '/path/to/when', main: 'when' }
    }
  });
  ```

1. Load when wherever you need it. For example, as part of a module:

  ```
  define(['when', ...], function(when, ...) { ... });
  ```

#### Node

1. `npm install when`
1. `var when = require('when');`

#### RingoJS

1. `ringo-admin install cujojs/when`
1. `var when = require('when');`
<commit_msg>Add info about ES5 and shims<commit_after>Getting Started
===============

[CJS](http://wiki.commonjs.org/wiki/CommonJS) and [AMD](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition) are the primary targets for `when`, but instructions for a variety of setups are provided below.

As of version 3.0, when.js requires an ES5 environment.  In older environments, an ES5 shim such as [poly](https://github.com/cujojs/poly) or [es5-shim](https://github.com/es-shims/es5-shim)

#### AMD

1. Get it. `bower install when`, `yeoman install when`, or `git clone https://github.com/cujojs/when`

1. Configure your loader. Here is an example of how configuring the package might look:

  ```js
  // using requirejs
  requirejs.config({
    packages: [
      { name: 'when', location: '/path/to/when', main: 'when' }
    ]
  });

  // using curl.js
  curl.config({
    packages: {
      when: { location: '/path/to/when', main: 'when' }
    }
  });
  ```

1. Load when wherever you need it. For example, as part of a module:

  ```
  define(function(require) {
  	var when = require('when');
  });
  ```

#### Node

1. `npm install when`
1. `var when = require('when');`

#### RingoJS

1. `ringo-admin install cujojs/when`
1. `var when = require('when');`

{'fraction_non_alphanumeric': 0.17253073336159389, 'fraction_numerical': 0.008902077151335312, 'mean_word_length': 3.330275229357798, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '3700955', 'n_tokens_mistral': 790, 'n_tokens_neox': 775, 'n_words': 247}