New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

scribe-editor

Package Overview
Dependencies
Maintainers
9
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scribe-editor - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# 1.3.6
Fixes a bug preventing individual events being switched off events in the event-emitter
Bumps Lodash to 3.5.0 in the NPM package description for those using CommonJS builds
Thanks [Ryan Fitzgerald](https://github.com/rf-)!
# 1.3.5

@@ -2,0 +9,0 @@

6

package.json
{
"name": "scribe-editor",
"version": "1.3.5",
"version": "1.3.6",
"main": "src/scribe.js",
"dependencies": {
"lodash-amd": "~2.4.1",
"lodash-amd": "~3.5.0",
"immutable": "~3.6.2"

@@ -27,3 +27,3 @@ },

"request": "~2.33.0",
"scribe-test-harness": "~0.0.19",
"scribe-test-harness": "~0.0.20",
"selenium-webdriver": "~2.41.0",

@@ -30,0 +30,0 @@ "sinon": "^1.12.2"

@@ -22,5 +22,5 @@ define(['lodash-amd/modern/array/pull',

if (fn) {
this._listeners = listeners.delete(fn);
this._listeners[eventName] = listeners.delete(fn);
} else {
this._listeners = listeners.clear();
this._listeners[eventName] = listeners.clear();
}

@@ -27,0 +27,0 @@ };

@@ -42,11 +42,35 @@ require('node-amd-require')({

it('should remove listeners when off is called', function(){
var handle = sinon.spy();
emitter.on('event', handle);
it('should remove a specific listener when off is called', function(){
var handleOne = sinon.spy();
var handleTwo = sinon.spy();
emitter.on('event', handleOne);
emitter.on('event', handleTwo);
emitter.trigger('event');
emitter.off('event', handle);
emitter.off('event', handleOne);
emitter.trigger('event');
expect(handle.callCount).to.equal(1);
})
expect(handleOne.callCount).to.equal(1);
expect(handleTwo.callCount).to.equal(2);
});
it('should remove all listeners when off is called', function(){
var handleOne = sinon.spy();
var handleTwo = sinon.spy();
emitter.on('event', handleOne);
emitter.on('event', handleTwo);
emitter.trigger('event');
emitter.off('event');
emitter.trigger('event');
expect(handleOne.callCount).to.equal(1);
expect(handleTwo.callCount).to.equal(1);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc