Coder Social home page Coder Social logo

eventsnodejs's Introduction

ipm package: EventsNodeJs

Overview

Partial Implementation of NodeJs' Events library

This is an ipm package, which contains one or more reusable assets within the ipm Community. The 'package.json' in this repo is a ipm spec's package.json, here, which is a superset of npm's package.json spec, here.

Browse ipm Packages

Setup

Import Just the Code Library, Code Service just gives an exmaple of how to use it.

Usage

Example Checkout the Code Service, once system is imported.

function TestEventsNodeJs(req, resp) {
  const EventEmitter = EventsNodeJs();
  var ee = new EventEmitter();
  ee.on("message", function(text) {
    log(text);
    resp.success('Success');
  });
  ee.emit("message", "hello world");
}

API

The goal is to provide an API that is identical to node's Events API. Currently matches Node.js 10.1 API. It is modified from node-events library.

Contributing

PRs are very welcome! The main way to contribute to EventsNodeJs is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5 (followed by some modifications), rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js. This module intends to provide exactly the same API as Node.js, so features that are not available in the core Events module will not be accepted.

If there is a difference in behaviour between Node.js's Events module and this module, please open an issue!

eventsnodejs's People

Contributors

yashjain28 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.