@promises/exec
v0.5.0
Published
Exec is package from Promises library
Downloads
37
Maintainers
Readme
@promises/exec
Exec is package from Promises library
Use
Module
$ npm install --save @promises/exec
import {
default as exec
} from '@promises/exec';
Browser
<script src="https://unpkg.com/@promises/exec/bundle.umd.min.js"></script>
let {
exec
} = P;
Examples
let foo = () => {
return 'bar';
};
exec(foo).then((result: string) => {
console.log(result); // => 'bar'
});
Wrapper
Module
$ npm install --save @promises/exec
import Promises from '@promises/core';
import '@promises/exec/add';
Or
import Promises from '@promises/exec/add';
Browser
<script src="https://unpkg.com/@promises/core/bundle.umd.min.js"></script>
<script src="https://unpkg.com/@promises/exec/add/bundle.umd.min.js"></script>
let {
Promises
} = P;
Examples
let foo = () => {
return 'bar';
};
Promises.exec(foo).then((result: string) => {
console.log(result); // => 'bar'
});
Compatibility
These modules are written in typescript and available in ES5 and ES6 standard, the requirements are a global Promise (native or polyfill).
License
Copyright © 2017 Yisrael Eliav, Licensed under the MIT license.