Skip to content

futagoza/a2p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status npm version devDependencies License

ES2017 async and await, as Promise's

features

A2P is a library that provides various methods that implement:

  • execute, a function executer, faster then Function.prototype.call
  • attempt, a wrapper for try {} catch ( e ) {}
  • Promise, a small and fast ES2015 Promise implmentaion
  • Async, a defered Promise
  • Await, a smart-wrapper to always return a Promise

dist outline

  • 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

installation

npm

$ npm install a2p --save

bower

$ bower install a2p=futagoza/a2p --save

usage

node.js

// Automatically require's `a2p/dist/a2p-es5.commonjs.js` or `a2p/dist/a2p-es6.commonjs.js`.
const a2p = require( "a2p" );

browser (es5, global/amd)

<script src="bower_components/a2p/dist/a2p-es5.umd.js"></script>
// global
var a2p = window.a2p;

// amd
define( function( require ) {

    var a2p = require( "a2p" );

    // ...

} );

browser (es5, amd only)

define( [ "/bower_components/a2p/dist/a2p-es5.amd.js" ], function( a2p ) {

    // ...

} );

license

Copyright © 2017 Futago-za Ryuu, https://github.com/futagoza
Released under the MIT License, http://opensource.org/licenses/MIT

Releases

No releases published

Packages

No packages published