Coder Social home page Coder Social logo

event-sky's Issues

vent.register({ ... }) for passing in a map of events

Use case

const eventMap = {
  'event1': this.event1Handler,
  'event2': this.event2Handler,
}

const ventIdList = vent.register(eventMap)

console.log(ventIdList) // [eventId1, eventId2] 

vent.off(eventMap)
// or
ventIdList.forEach(vent.off)
// or 
vent.off.all(ventIdList)

Todo for v1

  • add changelog
  • verify a correct singleton pattern in Browserify, Webpack, Node.js envs
  • unit test all functionality

custom logger function

Instead of only being able to use the default firehose logging, provide a way to extend event-store to use a custom function similar to a redux middleware function.

pass callback to .off(...) to remove

currently we pass an event name or an eventId to remove a listener, it would be nice to have the same functionality as other event type frameworks like jquery, etc. by passing in the function/callback to be removed

.trigger.nextTick('eventName', data)

This is useful in places like a redux store action creator where you trigger an action but don't want the trigger event to happen until after the reducer has gone through it's callstack, so, we give a convenience method that puts the .trigger() on the next cpu tick.

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.