@lvchengbin/promise

Promise/A+ implementation for browsers.

Stats

StarsIssuesVersionUpdatedCreatedSize
@lvchengbin/promise
001.1.73 years ago4 years agoMinified + gzip package size for @lvchengbin/promise in KB

Readme

Promise

Promise implementation conforming the Promises/A+ for browsers.

Installation

$ npm i @lvchengbin/promise --save

Usage

NodeJS

const Promise = require( '@lvchengbin/promise' );

ES6

import Promise from '@lvchengbin/promise';

Using in Browsers

If you want to invoke the JavaScript file to browser directly, you can use promise.js. For old browsers which are not support ES5, you should use promise.bc.js.

<script src="./promise.bc.js"></script> 
<script>
    new Promise( function( resolve ) {
        setTimeout( function() {
            resolve( 100 );
        }, 1000 );
    } ).then( function( value ) {
        console.log( value );
    } );
</script>

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.