Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@nichoth/events

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nichoth/events - npm Package Compare versions

Comparing version
3.1.3
to
3.1.4
+1
-1
package.json
{
"name": "@nichoth/events",
"version": "3.1.3",
"version": "3.1.4",
"description": "Event emitter and helpers",

@@ -5,0 +5,0 @@ "directories": {

@@ -9,7 +9,2 @@ import test from "tape";

t.equal(typeof bus.emit, "function", "should have .emit");
t.doesNotThrow(
() => Bus.createEvents({ test: ["test"] }),
null,
"prefix parameter is optional"
);
t.end();

@@ -133,1 +128,10 @@ });

});
test("star listener", (t) => {
t.plan(2);
const bus2 = new Bus(["foo", "bar"]);
bus2.on("*", function(name, data) {
t.equal(name, "foo", "should get the event name");
t.equal(data, "hello", "should get the event data");
});
bus2.emit("foo", "hello");
});

@@ -125,1 +125,13 @@ import test from 'tape'

})
test('star listener', t => {
t.plan(2)
const bus = new Bus(['foo', 'bar'])
bus.on('*', function (name:string, data) {
t.equal(name, 'foo', 'should get the event name')
t.equal(data, 'hello', 'should get the event data')
})
bus.emit('foo', 'hello')
})