<commit_before># saber-promise

<del><a href="http://baike.baidu.com/view/8420590.htm" target="_blank">吾王</a>的</del>移动端的[Promise/A+](http://promises-aplus.github.io/promises-spec/)实现

## Usage

    var Resolver = require('saber-promise');
    
    function doSomeThing() {
        var resolver = new Resolver();
        doSync(function (result) {
            resolver.fulfill(result);
        });
        return resolver.promise();
    }

    doSomeThing().then(function () {
        alert(result);
    });
<commit_msg>update usage<commit_after># saber-promise

<del><a href="http://baike.baidu.com/view/8420590.htm" target="_blank">吾王</a>的</del>移动端的[Promise/A+](http://promises-aplus.github.io/promises-spec/)实现

## Usage

    var Resolver = require('saber-promise');
    
    function doSomeThing() {
        var resolver = new Resolver();
        doSync(
            function (result) {
                resolver.fulfill(result);
            },
            function () {
                resolver.reject('connect error');
            }
        );
        return resolver.promise();
    }

    doSomeThing().then(
        function (result) {
            alert(result);
        },
        function (reason) {
            alert(reason);
        }
    );

{'fraction_non_alphanumeric': 0.1573482428115016, 'fraction_numerical': 0.011182108626198083, 'mean_word_length': 2.086206896551724, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3643907', 'n_tokens_mistral': 434, 'n_tokens_neox': 413, 'n_words': 54}