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

prime

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prime - npm Package Compare versions

Comparing version 0.4.2 to 0.5.0

0

defer.js

@@ -0,0 +0,0 @@ /*

9

emitter.js

@@ -15,2 +15,6 @@ /*

constructor: function(stoppable){
this._stoppable = stoppable
},
on: function(event, fn){

@@ -26,3 +30,3 @@ var listeners = this._listeners || (this._listeners = {}),

off: function(event, fn){
var listeners = this._listeners, events, key, length = 0
var listeners = this._listeners, events
if (listeners && (events = listeners[event])){

@@ -47,3 +51,4 @@

forEach(events.slice(0), function(event){
return event.apply(self, args)
var result = event.apply(self, args)
if (self._stoppable) return result
})

@@ -50,0 +55,0 @@ }

@@ -0,0 +0,0 @@ /*

@@ -0,0 +0,0 @@ /*

{
"name": "prime",
"homepage": "https://github.com/mootools/prime",
"version": "0.4.2",
"version": "0.5.0",
"main": "./index.js",

@@ -28,14 +28,14 @@ "description": "prime, an OOP JavaScript library for node and the web.",

"dependencies": {
"mout": "~0.9"
"mout": "^0.11.0"
},
"devDependencies": {
"mocha": ">=1.18.2 < 2.0.0",
"coveralls": "^2.11.2",
"expect.js": "~0.3.1",
"istanbul": "~0.2.6",
"coveralls": "~2.10.0",
"mocha-lcov-reporter": "0.0.1"
"istanbul": "^0.3.13",
"mocha": "^2.2.4",
"mocha-lcov-reporter": "0.0.2"
},
"scripts": {
"test": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
"test": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
}
}

@@ -0,0 +0,0 @@ # ![prime](http://kamicane.github.io/assets/prime.png)

@@ -0,0 +0,0 @@ "use strict";

@@ -5,2 +5,3 @@ "use strict";

var emitter = require('../emitter')
var defer = require('../defer')

@@ -56,3 +57,9 @@ describe('emitter', function(){

var events = new emitter(), called = 0
var listener = function(){ done() }
var listener = function(){
called++
defer(function() {
expect(called).to.be(1)
done()
})
}
events.on('thing', listener)

@@ -88,3 +95,33 @@ events.on('thing', listener)

it('should not stop immediate propagation', function(done){
var publisher = new emitter()
publisher.on('publish', function(){
return false;
})
publisher.on('publish', function(){
done()
})
publisher.emit('publish')
})
it('should allow stopping immediate propagation', function(done){
var publisher = new emitter(true)
publisher.on('publish', function(){
defer(function() {
done();
})
return false;
})
publisher.on('publish', function(){
expect().fail()
})
publisher.emit('publish')
})
})

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict"

Sorry, the diff of this file is not supported yet

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