0.5.0 • Published 6 years ago

@promises/exec v0.5.0

Weekly downloads
64
License
MIT
Repository
github
Last release
6 years ago

@promises/exec

Source Code Version MIT License Bundle Size

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.