Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@foundit/broadcasterjs
Advanced tools
No need to initialize separately. Import the 'broadcast' factory function and use to your hearts content.
useEffect(() => {
broadcast.on(['BROADCAST-ID', flagReceivedFunction])
}, [flagReceivedFunction])
broacaster.on([
'BROADCAST-ID',
({ detail }) => {
document.body.append(detail + ' ')
},
])
broacaster.once([
'BROADCAST-ID',
({ detail }) => {
document.body.append(detail + ' ')
},
])
broacaster.off([
'BROADCAST-ID',
({ detail }) => {
document.body.append(detail + ' ')
},
])
broadcast.emit('BROADCAST-ID', 'Hello world')
Click elements tab i chrome devtools, select event-listeners tab in second pane. Active listeners begin with 'broadcast-' + flag name. Expand each listener to see each unique subscriber.
Add ?debug=broadcasterjs
to your url and open your devtools console.
The broadcaster functions on
,once
,off
takes an optional third value and emit
takes an optional third argument in the form of a settings object.
{
debug: boolean
debugGlobal: boolean
allowDoublettesSubscribers: boolean
}
Broadcasterjs does prevent doublettes with the same subscriber combination (flag + callback function). If you for some reason would want the same combination on another place in the code either just add a minor change, a comment etc or send in the settings object with allowDoublettesSubscribers
set to true.
FAQs
A simple yet powerful pub/sub pattern javascript event bus
The npm package @foundit/broadcasterjs receives a total of 106 weekly downloads. As such, @foundit/broadcasterjs popularity was classified as not popular.
We found that @foundit/broadcasterjs 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.