<commit_before># light-promise
A Super Lightweight [Promise/A+](https://promisesaplus.com) implementation, tested by [promises-tests](https://github.com/promises-aplus/promises-tests)

> TODO: Test case 2.3.3 failed by now.

[![NPM version](https://badge.fury.io/js/light-promise.svg)](http://badge.fury.io/js/light-promise)
[![Build Status](https://travis-ci.org/dracupid/light-promise.svg)](https://travis-ci.org/dracupid/light-promise)
[![Build status](https://ci.appveyor.com/api/projects/status/github/dracupid/light-promise?svg=true)](https://ci.appveyor.com/project/dracupid/light-promise)

## Usage
### Node/io
Run `npm install -S light-promise` in command line.
Then,
```javascript
var Promise = require('light-promise');
```
### Browser
Download the light-promise.min.js file.
> Light-promise is also a [bower](http://bower.io/) package.

- Add a script tag in your HTML file
```html
<script type="text/javascript" src="/light-promise.js"></script>
```
-  The global variables `Promise` is available after the above script tag.
    - Notice that if the browser supports [Promise](http://devdocs.io/javascript/global_objects/promise) natively, Promise variable will keep to be the native one, which I recommand you to use.
```javascript
var p = new Promise(function(resolve, reject){
    // ...
});
p.then(function(){});<commit_msg>trigger ci<commit_after># light-promise
A Super Lightweight [Promise/A+](https://promisesaplus.com) implementation, tested by [promises-tests](https://github.com/promises-aplus/promises-tests)

> TODO: Test case 2.3.3 failed by now.

[![NPM version](https://badge.fury.io/js/light-promise.svg)](http://badge.fury.io/js/light-promise)
[![Build Status](https://travis-ci.org/dracupid/light-promise.svg)](https://travis-ci.org/dracupid/light-promise)
[![Build status](https://ci.appveyor.com/api/projects/status/github/dracupid/light-promise?svg=true)](https://ci.appveyor.com/project/dracupid/light-promise)

## Usage
### Node/io
Run `npm install -S light-promise` in command line.
Then,
```javascript
var Promise = require('light-promise');
```
### Browser
Download the light-promise.min.js file.

> Light-promise is also a [bower](http://bower.io/) package.

- Add a script tag in your HTML file
```html
<script type="text/javascript" src="/light-promise.js"></script>
```
-  The global variables `Promise` is available after the above script tag.
    - Notice that if the browser supports [Promise](http://devdocs.io/javascript/global_objects/promise) natively, Promise variable will keep to be the native one, which I recommand you to use.
```javascript
var p = new Promise(function(resolve, reject){
    // ...
});
p.then(function(){});
{'fraction_non_alphanumeric': 0.1701492537313433, 'fraction_numerical': 0.002238805970149254, 'mean_word_length': 4.765591397849462, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3534670', 'n_tokens_mistral': 903, 'n_tokens_neox': 878, 'n_words': 204}