Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Javascript event emitter, foundation of everything.
Dot-event produces code that is:
One day, a dot
instance was born:
dot = require("dot-event")()
Each time dot
went into a composer, the composer added some functionality to it:
module.exports = function(dot) {
dot.any("sayHi", function() {
console.log("hi!")
})
}
The user had an easy time composing their dot
:
require("./hi")(dot)
require("./whatsUp")(dot)
require("./yo")(dot)
dot.sayHi()
Far away, a library author noticed the first argument behaves as expected...
dot.any("say", function(arg) {
console.log("arg:", arg)
})
dot.say("yo") // arg: yo
But the second argument does not!
dot.any("say", function(arg, opts) {
console.log("arg:", arg)
console.log("opts:", opts)
})
dot.say("yo", "hello")
// arg: hello
// opts: { dot: <DotEvent>, ns: "say", prop: "yo", propArr: ["yo"] }
And adding even more arguments only added more props!
dot.say("sup", "yo", "hello")
// arg: hello
// opts: { dot: <DotEvent>, ns: "say", prop: "sup.yo", propArr: ["sup", "yo"] }
And thus their journey began...
dot.someEvent("a.b.c", ["d", "e", "f"], { opt: true })
// ^—— event ^—— prop ^—— prop ^—— arg
arg
) may be of any type the event requires.String
or Array.<String>
, it is not included.dot.any("someEvent", function(arg, opts) {
// ^—— event ^—— ^—— { dot, event, prop, propArr }
})
arg
) may be of any type the event requires.String
, a prop String
, and a prop Array.<String>
.Library | Description | URL |
---|---|---|
arg | Run functions from CLI or web | https://github.com/dot-event/arg |
log | Log functions | https://github.com/dot-event/log2 |
store | Immutable store | https://github.com/dot-event/store2 |
FAQs
Powerful event emitter
The npm package dot-event receives a total of 90 weekly downloads. As such, dot-event popularity was classified as not popular.
We found that dot-event 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.