Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cog

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cog - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

.bithoundrc

37

package.json

@@ -5,6 +5,7 @@ {

"author": "Damon Oehlman <damon.oehlman@gmail.com>",
"version": "1.0.0",
"version": "1.1.0",
"dependencies": {},
"devDependencies": {
"tape": "~2.4.2"
"tape": "^3.5.0",
"testling": "^1.7.1"
},

@@ -20,34 +21,6 @@ "repository": {

"gendocs": "gendocs > README.md",
"test": "$(npm bin)/tape test/all.js"
"test": "node test/all.js && testling"
},
"testling": {
"files": "test/all.js",
"browsers": {
"ie": [
9,
10
],
"ff": [
23,
24,
25,
"nightly"
],
"chrome": [
29,
30,
31,
"canary"
],
"safari": [
5.1,
6
],
"opera": [
15,
16,
17,
"next"
]
}
"files": "test/all.js"
},

@@ -54,0 +27,0 @@ "homepage": "https://github.com/DamonOehlman/cog",

@@ -24,3 +24,3 @@ /* jshint node: true */

__NOTE:__ Deprecated, moved into [dd](https://github.com/DamonOehlman/dd)
__NOTE:__ Deprecated, moved into [dd](https://github.com/DamonOehlman/fdom)
**/

@@ -48,2 +48,2 @@ module.exports = function(selector, scope) {

);
};
};

@@ -9,7 +9,4 @@ # cog

[![Build Status](https://img.shields.io/travis/DamonOehlman/cog.svg?branch=master)](https://travis-ci.org/DamonOehlman/cog)
[![browser support](https://ci.testling.com/DamonOehlman/cog.png)](https://ci.testling.com/DamonOehlman/cog)
[![Build Status](https://img.shields.io/travis/DamonOehlman/cog.svg?branch=master)](https://travis-ci.org/DamonOehlman/cog) [![bitHound Score](https://www.bithound.io/github/DamonOehlman/cog/badges/score.svg)](https://www.bithound.io/github/DamonOehlman/cog)
## Why would I want to use browserify?

@@ -73,2 +70,21 @@

## cog/extend-existing
```js
var extend = require('cog/extend-existing');
```
### extend(target, *)
Shallow copy object properties from the supplied source objects (*) into
the target object, returning the target object once completed. This differs
from the default `extend` implementation, however, as only those properties
that exist in target will be copied from any other provided objects.
```js
extend({ a: 1, b: 2 }, { c: 3 }, { d: 4 }, { b: 5 }));
// --> { a: 1, b: 5 }
```
## cog/extend

@@ -217,3 +233,3 @@

__NOTE:__ Deprecated, moved into [dd](https://github.com/DamonOehlman/dd)
__NOTE:__ Deprecated, moved into [dd](https://github.com/DamonOehlman/fdom)

@@ -260,3 +276,3 @@ ## cog/raf

Copyright (c) 2014 Damon Oehlman <damon.oehlman@gmail.com>
Copyright (c) 2015 Damon Oehlman <damon.oehlman@gmail.com>

@@ -263,0 +279,0 @@ Permission is hereby granted, free of charge, to any person obtaining

require('./defaults');
require('./extend');
require('./extend-existing');
require('./listen');

@@ -4,0 +5,0 @@ require('./logger');

@@ -7,2 +7,7 @@ var test = require('tape');

t.equal(extend({}, { a: true }).a, true, 'Property a copied across');
});
});
test('can override an attribute with an empty string update', function(t) {
t.plan(1);
t.equal(extend({}, { a: 'test' }, { a: '' }).a, '', 'Property a copied across');
});

@@ -15,40 +15,33 @@ var test = require('tape');

test('captures dom events', function(t) {
if (typeof document == 'undefined') {
return t.end('not in a browser environment');
}
if (typeof document != 'undefined') {
test('captures dom events', function(t) {
t.plan(1);
t.plan(1);
// create the test element
el = createSampleElement();
// create the test element
el = createSampleElement();
// listen to the emitter
emitter = listen(el, ['click']).once('click', function(evt) {
t.pass('received click event');
});
// listen to the emitter
emitter = listen(el, ['click']).once('click', function(evt) {
t.pass('received click event');
// generate the a click event
generateClick(el);
});
// generate the a click event
generateClick(el);
});
test('can stop event capture', function(t) {
t.plan(1);
emitter.stop();
emitter.once('click', function() {
t.fail('captured event and should not have');
});
test('can stop event capture', function(t) {
if (typeof document == 'undefined') {
return t.end();
}
el.addEventListener('click', function() {
t.pass('normal event capture worked as expected');
});
t.plan(1);
emitter.stop();
emitter.once('click', function() {
t.fail('captured event and should not have');
generateClick(el);
});
}
el.addEventListener('click', function() {
t.pass('normal event capture worked as expected');
});
generateClick(el);
});
/* internal helpers */

@@ -55,0 +48,0 @@

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