<commit_before># Environment support and polyfills

InversifyJS requires a modern JavaScript engine with support for the 
[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise), 
[Reflect (with metadata)](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) and 
[Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) objects. 
If your environment don't support one of these you will need to import a shim or polypill.

## Metadata Reflection API
Required always. Use [reflect-metadata](https://www.npmjs.com/package/reflect-metadata) as polypill.
```
$ npm install reflect-metadata
```
The type definitions for reflect-metadata are included in the npm package. You need to add the following reference:
```
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts" />
```
Finally, import reflect-metadata:
```
import "reflect-metadata";
```
This will create the Reflect object as a global.

## Promise
Required only if you use want to 
[inject a provider](https://github.com/inversify/InversifyJS#injecting-a-provider-asynchronous-factory). 
Use the [bluebird](https://www.npmjs.com/package/bluebird) as polyfill.
```
$ npm install bluebird
$ typings install bluebird
```
After installing it add a reference to the `bluebird.d.ts` file:
```
/// <reference path="typings/main.d.ts" />
```
Finally, import bluebird:<commit_msg>Update environment.md<commit_after># Environment support and polyfills

InversifyJS requires a modern JavaScript engine with support for the 
[Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise), 
[Metadata Reflection API](http://rbuckton.github.io/ReflectDecorators/#reflect) and 
[Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) objects. 
If your environment don't support one of these you will need to import a shim or polypill.

## Metadata Reflection API
Required always. Use [reflect-metadata](https://www.npmjs.com/package/reflect-metadata) as polypill.
```
$ npm install reflect-metadata
```
The type definitions for reflect-metadata are included in the npm package. You need to add the following reference:
```
/// <reference path="node_modules/reflect-metadata/reflect-metadata.d.ts" />
```
Finally, import reflect-metadata:
```
import "reflect-metadata";
```
This will create the Reflect object as a global.

## Promise
Required only if you use want to 
[inject a provider](https://github.com/inversify/InversifyJS#injecting-a-provider-asynchronous-factory). 
Use the [bluebird](https://www.npmjs.com/package/bluebird) as polyfill.
```
$ npm install bluebird
$ typings install bluebird
```
After installing it add a reference to the `bluebird.d.ts` file:
```
/// <reference path="typings/main.d.ts" />
```
Finally, import bluebird:
{'fraction_non_alphanumeric': 0.1267751991686872, 'fraction_numerical': 0.0, 'mean_word_length': 5.105708245243129, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 11, 'lorem ipsum': 0, 'www.': 4, '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': '4291375', 'n_tokens_mistral': 886, 'n_tokens_neox': 824, 'n_words': 244}