Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bloc-promise

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bloc-promise

Bloc Promise is the invoker function of a bloc which provides a promise api.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bloc-promise

Bloc Promise is the invoker function of a bloc which provides a promise api.

This enables you to use all of your blocs using a promise api.

Usage

const exec = require('bloc-promise')(bus)

exec('GEOCODE', { address: '1234 Main Street', city: 'Anytown', state: 'SC', zip: '29464'})
  .then(res => console.log(res))
  .catch(foo => console.log(foo))

bloc-promise takes three inputs:

  • adapter/bus - this adpater bus, must support .on, once, and .emit functions
  • bloc type - this is a string that is the bloc type that is used to invoke the bloc
  • payload - this is the data that is sent to the bloc as input.

returns

The bloc-promise will always return an object as a result.

FAQs

Package last updated on 22 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc