0.5.0 • Published 7 years ago
@promises/exec v0.5.0
@promises/exec
Exec is package from Promises library
Use
Module
$ npm install --save @promises/execimport {
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/execimport 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.