Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

call-me-maybe

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

call-me-maybe

Let your JS API users either give you a callback or receive a promise

    1.0.2nextlatest

Version published
Maintainers
1
Weekly downloads
8,261,340
decreased by-8.63%

Weekly downloads

Changelog

Source

v1.0.2

1.0.2 (2022-10-31)

Bug Fixes

  • undefined global in some cjs environments (c4228da), closes #7

Readme

Source

call-me-maybe Continuous Release

Let your JS API users either give you a callback or receive a promise.

Usage

var maybe = require("call-me-maybe") module.exports = function asyncFunc (cb) { return maybe(cb, new Promise(function(resolve, reject) { // ... })) }

API

maybe(cb, promise)

If the callback cb is truthy, returns undefined and will call cb when promise is settled. The parameters passed to cb are standard error-first:

  • If promise is fulfilled, then it is called with the result of the promise: cb(null, result)
  • If promise is rejected, then it is called with the rejection error: cb(err)

If cb is falsey, then promise is returned.

Keywords

FAQs

What is call-me-maybe?

Let your JS API users either give you a callback or receive a promise

Is call-me-maybe popular?

The npm package call-me-maybe receives a total of 6,641,461 weekly downloads. As such, call-me-maybe popularity was classified as popular.

Is call-me-maybe well maintained?

We found that call-me-maybe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 31 Oct 2022

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc