ambi
- Version 10.9.0
- Published
- 52.3 kB
- 2 dependencies
- Artistic-2.0 license
Install
npm i ambi
yarn add ambi
pnpm add ambi
Overview
Ambi lets you execute any function ambidextrously; providing you the ability to execute any function (be it synchronous, asynchronous, returns, callbacks, promises) as if it returned a promise.
Index
Functions
Functions
function ambi
ambi: <Result>(method: Function, ...args: any) => Promise<Result>;
Ambidextrously execute the method with the passed arguments. If method.length > args.length, then ambi provides the method with a completion callback as the last expected argument.
Parameter method
A method, that can either resolve synchronously, via a promise, or via a callback.
Parameter args
The arguments to provide the function.
Returns
The determined result.
Package Files (1)
Dependencies (2)
Dev Dependencies (16)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ambi
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/ambi)
- HTML<a href="https://www.jsdocs.io/package/ambi"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2549 ms. - Missing or incorrect documentation? Open an issue for this package.