{"id":25434380,"url":"https://github.com/d-mobilelab/bluebus","last_synced_at":"2025-07-23T08:34:21.410Z","repository":{"id":58244451,"uuid":"83671100","full_name":"D-Mobilelab/bluebus","owner":"D-Mobilelab","description":"Event Emitter with advanced bind/trigger system","archived":false,"fork":false,"pushed_at":"2019-07-25T14:30:42.000Z","size":520,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-30T06:41:09.672Z","etag":null,"topics":["bind","bower","event-emitter","event-management","eventbus","trigger-events"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/D-Mobilelab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-02T11:37:07.000Z","updated_at":"2020-07-30T12:40:14.000Z","dependencies_parsed_at":"2022-08-31T00:40:17.543Z","dependency_job_id":null,"html_url":"https://github.com/D-Mobilelab/bluebus","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/D-Mobilelab/bluebus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2Fbluebus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2Fbluebus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2Fbluebus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2Fbluebus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/D-Mobilelab","download_url":"https://codeload.github.com/D-Mobilelab/bluebus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D-Mobilelab%2Fbluebus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266645252,"owners_count":23961678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bind","bower","event-emitter","event-management","eventbus","trigger-events"],"created_at":"2025-02-17T06:16:34.595Z","updated_at":"2025-07-23T08:34:21.374Z","avatar_url":"https://github.com/D-Mobilelab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bluebus\n\n[![Build Status](https://travis-ci.org/D-Mobilelab/bluebus.svg?branch=master\u0026v=2)](https://travis-ci.org/D-Mobilelab/bluebus)\n[![Coverage Status](https://coveralls.io/repos/github/D-Mobilelab/bluebus/badge.svg?branch=master\u0026v=1)](https://coveralls.io/github/D-Mobilelab/bluebus?branch=master)\n[![npm version](https://badge.fury.io/js/bluebus.svg)](https://badge.fury.io/js/bluebus)\n[![Bower version](https://badge.fury.io/bo/bluebus.svg)](https://badge.fury.io/bo/bluebus)\n[![GitHub version](https://badge.fury.io/gh/D-Mobilelab%2Fbluebus.svg)](https://badge.fury.io/gh/D-Mobilelab%2Fbluebus)\n\nBluebus is a event library with bind/trigger system\n\n## Installation\n\n### NPM\n\n    npm install --save bluebus\n\nYou can found the library on \u003ci\u003enode_modules/bluebus/dist/bluebus.js\u003c/i\u003e\n\n### Bower\n\n    bower install --save bluebus\n\nYou can found the library on \u003ci\u003ebower_components/bluebus/dist/bluebus.js\u003c/i\u003e\n\n## Import\n\nYou can use Bluebus with require\n\n    var Bluebus = require('bluebus');\n\nor as global variable, called \u003ci\u003eBluebus\u003c/i\u003e.\n\n## Usage\n\n### Simple use\n\n    // bind an event\n    Bluebus.bind('openMenu', function(number){\n        console.log('value is ' + number);\n    });\n\n    // trigger an event\n    Bluebus.trigger('openMenu', 5);\n    // it executes previous binding on same event, console will logs 'value is 5'\n\n### Multiple bind\n\n    // bind an event\n    Bluebus.bind('color', function(number){\n        console.log('yellow is ' + number);\n    });\n\n    // bind same event\n    Bluebus.bind('color', function(number){\n        console.log('red is ' + number);\n    });\n\n    // trigger an event\n    Bluebus.trigger('color', 10);\n    // it executes previous binding functions\n    // console will logs 'yellow is 10' and 'red is 10'\n\n### Before trigger, after bind\n\n    // trigger an event before binding\n    Bluebus.trigger('closeMenu', 15);\n\n    // bind triggered event \n    Bluebus.bind('closeMenu', function(number){\n        console.log('new value is ' + number);\n    });\n    // it is immediately executed because this event has already been triggered\n    // console will logs 'new value is 15'\n\n### Multiple trigger\n\n    // bind an event\n    Bluebus.bind('multipleEvent', function(number){\n        console.log('multipleEvent is ' + number);\n    });\n\n    // trigger an event 2 times, leaving stack\n    Bluebus.trigger('multipleEvent', 1, true);\n    Bluebus.trigger('multipleEvent', 2, true);\n    // Passing true as last parameter, the stack of binding functions is mantained\n    // console will logs 'multipleEvent is 1' and 'multipleEvent is 2'\n\n    Bluebus.trigger('multipleEvent', 3);\n    // If you don't pass true as last parameter, the stack of binding functions is cleaned\n    // console will logs 'multipleEvent is 3'\n\n    Bluebus.trigger('multipleEvent', 4);\n    // nothing is happening, the stack of binding functions is already cleaned\n    \n### isTriggered\n\n    // check if an event has been triggered, returns true or false\n    Bluebus.isTriggered('openMenu');\n\n### clean and cleanAll\n\n    // clean a previous events and relative bindings\n    Bluebus.clean('openMenu');\n\n    // clean all events and relative bindings\n    Bluebus.cleanAll();\n\n## Contribute\n\nTo contribute to this library, read CONTRIBUTE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-mobilelab%2Fbluebus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-mobilelab%2Fbluebus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-mobilelab%2Fbluebus/lists"}