wildemitter
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "wildemitter", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Henrik Joreteg <henrik@andyet.net>", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -99,3 +99,4 @@ # WildEmitter - A lightweight event emitter that supports wildcard handlers | ||
v1.0.0 [diff](https://github.com/henrikjoreteg/wildemitter/compare/v0.0.5...v1.0.0) - Copy emitter array before firing. Though its unlikely this could impact how your application functions, hence bumping the 1st major version number per semver conventions. | ||
- v1.0.1 [diff](https://github.com/henrikjoreteg/wildemitter/compare/v1.0.0...v1.0.1) - Fixes wildcard matching issue. | ||
- v1.0.0 [diff](https://github.com/henrikjoreteg/wildemitter/compare/v0.0.5...v1.0.0) - Copy emitter array before firing. Though its unlikely this could impact how your application functions, hence bumping the 1st major version number per semver conventions. | ||
@@ -102,0 +103,0 @@ ## Credits |
@@ -113,3 +113,3 @@ function WildEmitter() { | ||
split = item.split('*'); | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[1].length) === split[1])) { | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) { | ||
result = result.concat(this.callbacks[item]); | ||
@@ -116,0 +116,0 @@ } |
@@ -27,2 +27,4 @@ var Emitter = require('./wildemitter'); | ||
apple.on('te*', cb()); | ||
// This should NOT add to count. Regression test for issue #4 | ||
apple.on('other*', cb()); | ||
apple.on('test', cb()); | ||
@@ -29,0 +31,0 @@ apple.test(); |
@@ -113,3 +113,3 @@ function WildEmitter() { | ||
split = item.split('*'); | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[1].length) === split[1])) { | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) { | ||
result = result.concat(this.callbacks[item]); | ||
@@ -116,0 +116,0 @@ } |
@@ -134,3 +134,3 @@ /* | ||
split = item.split('*'); | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[1].length) === split[1])) { | ||
if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) { | ||
result = result.concat(this.callbacks[item]); | ||
@@ -137,0 +137,0 @@ } |
19297
452
112