@promises/exec
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

@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.

Package Sidebar

Install

npm i @promises/exec

Weekly Downloads

1

Version

0.5.0

License

MIT

Unpacked Size

23.1 kB

Total Files

27

Last publish

Collaborators

  • yisraelx