scribe-editor
Advanced tools
Comparing version 1.2.7 to 1.2.8
@@ -0,1 +1,4 @@ | ||
# 1.3.8 | ||
Event waterfall / [Event Namespacing](https://github.com/guardian/scribe/pull/337) | ||
# 1.2.7 | ||
@@ -2,0 +5,0 @@ |
{ | ||
"name": "scribe-editor", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"main": "src/scribe.js", | ||
"dependencies": { | ||
"lodash-amd": "~2.4.1", | ||
"immutable" : "~3.6.2" | ||
"immutable": "~3.6.2" | ||
}, | ||
@@ -16,5 +16,7 @@ "devDependencies": { | ||
"mversion": "~0.4.3", | ||
"plumber-cli": "~0.3.0", | ||
"node-amd-require": "^0.2.2", | ||
"npm": "^2.5.0", | ||
"plumber": "~0.3.0", | ||
"plumber-all": "~0.3.0", | ||
"plumber-cli": "~0.3.0", | ||
"plumber-glob": "~0.3.0", | ||
@@ -26,4 +28,5 @@ "plumber-requirejs": "~0.3.0", | ||
"request": "~2.33.0", | ||
"scribe-test-harness": "~0.0.17", | ||
"selenium-webdriver": "~2.41.0", | ||
"scribe-test-harness": "~0.0.17" | ||
"sinon": "^1.12.2" | ||
}, | ||
@@ -30,0 +33,0 @@ "scripts": { |
@@ -29,7 +29,14 @@ define(['lodash-amd/modern/arrays/pull', | ||
EventEmitter.prototype.trigger = function (eventName, args) { | ||
var listeners = this._listeners[eventName] || Immutable.Set(); | ||
listeners.forEach(function (listener) { | ||
listener.apply(null, args); | ||
}); | ||
//fire events like my:custom:event -> my:custom -> my | ||
var events = eventName.split(':'); | ||
while(!!events.length){ | ||
var currentEvent = events.join(':'); | ||
var listeners = this._listeners[currentEvent] || Immutable.Set(); | ||
//trigger handles | ||
listeners.forEach(function (listener) { | ||
listener.apply(null, args); | ||
}); | ||
events.splice((events.length - 1), 1); | ||
} | ||
}; | ||
@@ -36,0 +43,0 @@ |
@@ -29,3 +29,4 @@ /** | ||
mocha.addFile(__dirname + '/selection.spec.js'); | ||
mocha.addFile(__dirname + '/unit/event-emitter.spec.js'); | ||
createRunner(mocha); |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
183384
69
3843
20
1