Giter Site home page Giter Site logo

zevent's Introduction

zevent

very clear and high performance event This is a clean and high performance event.

1. npm install zevent
2. write code refer to the ./exampl/test.js.
let { ZEvent } = require('../index');

let ev1 = "ev-1";
let onEv1 = (a, b)=>{
    console.log("event coming: ev-1", a, b);
}

let event = new ZEvent();

console.log("event on: ev-1, onEv1");
event.on(ev1, onEv1);

console.log("event send: ev-1 123, abc");
event.send(ev1, 123, "abc");

setTimeout(() => {
    console.log("event off: ev-1, onEv1");
    event.off(ev1, onEv1);

    console.log("event send: ev-1 456, def");
    event.send(ev1, 456, "def");
}, 200);

zevent's People

Contributors

gzx-miller avatar

Stargazers

争逐 avatar

Watchers

James Cloos 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.