web3-core-promievent
This package extends the EventEmitter with the Promise class to allow chaining as well as multiple final states of a function.
Last updated 8 days ago by gregthegreek .
LGPL-3.0 · Repository · Original npm · Tarball · package.json
$ cnpm install web3-core-promievent 
SYNC missed versions from official npm registry.

web3-core-promievent

NPM Package Dependency Status Dev Dependency Status

This is a sub-package of web3.js.

This is the PromiEvent package used to return a EventEmitter mixed with a Promise to allow multiple final states as well as chaining.

Please read the documentation for more.

Installation

Node.js

npm install web3-core-promievent

Usage

const Web3PromiEvent = require('web3-core-promievent');

const myFunc = function(){
    const promiEvent = Web3PromiEvent();
    
    setTimeout(function() {
        promiEvent.eventEmitter.emit('done', 'Hello!');
        promiEvent.resolve('Hello!');
    }, 10);
    
    return promiEvent.eventEmitter;
};

// and run it
myFunc()
.on('done', console.log)
.then(console.log);

Current Tags

  • 1.3.0                                ...           latest (8 days ago)
  • 1.3.0-rc.0                                ...           rc (21 days ago)

57 Versions

  • 1.3.0                                ...           8 days ago
  • 1.3.0-rc.0                                ...           21 days ago
  • 1.2.11                                ...           2 months ago
  • 1.2.10 [deprecated]           ...           2 months ago
  • 1.2.10-rc.0 [deprecated]           ...           2 months ago
  • 1.2.9                                ...           3 months ago
  • 1.2.9-rc.0                                ...           4 months ago
  • 1.2.8                                ...           4 months ago
  • 1.2.8-rc.1                                ...           4 months ago
  • 1.2.8-rc.0                                ...           4 months ago
  • 1.2.7                                ...           5 months ago
  • 1.2.7-rc.0                                ...           5 months ago
  • 1.2.6                                ...           8 months ago
  • 1.2.5                                ...           8 months ago
  • 1.2.5-rc.0                                ...           8 months ago
  • 1.2.4                                ...           10 months ago
  • 1.2.3                                ...           10 months ago
  • 1.2.2                                ...           a year ago
  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 1.0.0-beta.48                                ...           2 years ago
  • 1.0.0-beta.47                                ...           2 years ago
  • 1.0.0-beta.46                                ...           2 years ago
  • 1.0.0-beta.45                                ...           2 years ago
  • 1.0.0-beta.44                                ...           2 years ago
  • 1.0.0-beta.43                                ...           2 years ago
  • 1.0.0-beta.42                                ...           2 years ago
  • 1.0.0-beta.41                                ...           2 years ago
  • 1.0.0-beta.40                                ...           2 years ago
  • 1.0.0-beta.39                                ...           2 years ago
  • 1.0.0-beta.38                                ...           2 years ago
  • 1.0.0-beta.37                                ...           2 years ago
  • 1.0.0-beta.36                                ...           2 years ago
  • 1.0.0-beta.35                                ...           2 years ago
  • 1.0.0-beta.34                                ...           2 years ago
  • 1.0.0-beta.33                                ...           3 years ago
  • 1.0.0-beta.32                                ...           3 years ago
  • 1.0.0-beta.31                                ...           3 years ago
  • 1.0.0-beta.30                                ...           3 years ago
  • 1.0.0-beta.29                                ...           3 years ago
  • 1.0.0-beta.28                                ...           3 years ago
  • 1.0.0-beta.27                                ...           3 years ago
  • 1.0.0-beta.26                                ...           3 years ago
  • 1.0.0-beta.25                                ...           3 years ago
  • 1.0.0-beta.22                                ...           3 years ago
  • 1.0.0-beta.21                                ...           3 years ago
  • 1.0.0-beta.17                                ...           3 years ago
  • 1.0.0-beta.16                                ...           3 years ago
  • 1.0.0-beta.15                                ...           3 years ago
  • 1.0.0-beta.14                                ...           3 years ago
  • 1.0.0-beta.13                                ...           3 years ago
  • 1.0.0-beta.12                                ...           3 years ago
  • 1.0.0-beta.11                                ...           3 years ago
  • 1.0.0-beta.10                                ...           3 years ago
  • 1.0.0-beta.9                                ...           3 years ago
  • 1.0.0-beta.8                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |