ES2017 async and await, as Promise's
A2P is a library that provides various methods that implement:
execute
, a function executer, faster thenFunction.prototype.call
attempt
, a wrapper fortry {} catch ( e ) {}
Promise
, a small and fast ES2015 Promise implmentaionAsync
, a defered PromiseAwait
, a smart-wrapper to always return a Promise
- ES5 AMD:
dist/a2p-es5.amd.js
- ES5 CommonJS:
dist/a2p-es5.commonjs.js
- ES5 UMD:
dist/a2p-es5.umd.js
- ES6 AMD:
dist/a2p-es6.amd.js
- ES6 CommonJS:
dist/a2p-es6.commonjs.js
- ES6 Module:
dist/a2p-es6.module.js
- ES6 UMD:
dist/a2p-es6.umd.js
$ npm install a2p --save
$ bower install a2p=futagoza/a2p --save
// Automatically require's `a2p/dist/a2p-es5.commonjs.js` or `a2p/dist/a2p-es6.commonjs.js`.
const a2p = require( "a2p" );
<script src="bower_components/a2p/dist/a2p-es5.umd.js"></script>
// global
var a2p = window.a2p;
// amd
define( function( require ) {
var a2p = require( "a2p" );
// ...
} );
define( [ "/bower_components/a2p/dist/a2p-es5.amd.js" ], function( a2p ) {
// ...
} );
Copyright © 2017 Futago-za Ryuu, https://github.com/futagoza
Released under the MIT License, http://opensource.org/licenses/MIT