
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@phanan/vuebus
Advanced tools
A dead-simple event bus for Vue 2.
Install VueBus with yarn or npm:
yarn add @phanan/vuebus
# or
npm install @phanan/vuebus
First, import and initialize a new VueBus instance:
import VueBus from '@phanan/vuebus'
const bus = new VueBus()
bus.emit('userLoggedIn')
bus.emit('userLoggedIn', 'with', 'additional', data)
With VueBus, you can listen and react to one event:
bus.on('userLoggedIn', () => this.sayHello())
or an array of events:
bus.on(['userLoggedIn', 'userLoggedBackIn'], () => this.sayHello())
By passing an object of { eventName: callbackFunction }
shape, you can listen to several events and react to each of them with a different callback:
bus.on({
userLoggedIn () {
this.sayHello()
},
userLoggedOut () {
this.sayGoodbye()
}
})
once
and off
VueBus's once
and off
behave exactly like their Vue counterparts.
VueBus can attach itself to Vue.prototype and become available as an instance property with the attach
function . By default, you can access VueBus as this.$vuebus
, but the property name can be customized by passing a string as an argument.
(new VueBus()).attach()
// VueBus is now available as a Vue's instance property
this.$vuebus.emit('userLoggedIn')
// Use a custom property name
(new VueBus()).attach('$bus')
this.$bus.emit('userLoggedIn')
MIT © Phan An
FAQs
A simple event bus for Vue
The npm package @phanan/vuebus receives a total of 35 weekly downloads. As such, @phanan/vuebus popularity was classified as not popular.
We found that @phanan/vuebus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.