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

@cycle/dom

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cycle/dom - npm Package Compare versions

Comparing version 15.0.0 to 15.1.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="15.1.0"></a>
# 15.1.0 (2017-02-24)
### Bug Fixes
* **dom:** fix issue 531 ([539a196](https://github.com/cyclejs/cyclejs/tree/master/packages/dom/commit/539a196))
<a name="15.0.0"></a>

@@ -2,0 +12,0 @@ # 15.0.0 (2017-02-22)

28

lib/hyperscript-helpers.js

@@ -10,20 +10,26 @@ "use strict";

function createTagFunction(tagName) {
return function hyperscript(first, b, c) {
if (isSelector(first)) {
if (typeof b !== 'undefined' && typeof c !== 'undefined') {
return h_1.h(tagName + first, b, c);
return function hyperscript(a, b, c) {
var hasA = typeof a !== 'undefined';
var hasB = typeof b !== 'undefined';
var hasC = typeof c !== 'undefined';
if (isSelector(a)) {
if (hasB && hasC) {
return h_1.h(tagName + a, b, c);
}
else if (typeof b !== 'undefined') {
return h_1.h(tagName + first, b);
else if (hasB) {
return h_1.h(tagName + a, b);
}
else {
return h_1.h(tagName + first, {});
return h_1.h(tagName + a, {});
}
}
else if (!!b) {
return h_1.h(tagName, first, b);
else if (hasC) {
return h_1.h(tagName + a, b, c);
}
else if (!!first) {
return h_1.h(tagName, first);
else if (hasB) {
return h_1.h(tagName, a, b);
}
else if (hasA) {
return h_1.h(tagName, a);
}
else {

@@ -30,0 +36,0 @@ return h_1.h(tagName, {});

{
"name": "@cycle/dom",
"version": "15.0.0",
"version": "15.1.0",
"description": "The standard DOM Driver for Cycle.js, based on Snabbdom",

@@ -46,4 +46,4 @@ "license": "MIT",

"devDependencies": {
"@cycle/isolate": "2.0.0-rc.2",
"@cycle/rxjs-run": "4.0.0-rc.6",
"@cycle/isolate": "2.0.0",
"@cycle/rxjs-run": "4.1.0",
"@types/mocha": "^2.2.33",

@@ -50,0 +50,0 @@ "@types/node": "^7.0.4",

@@ -13,15 +13,20 @@ import {h} from 'snabbdom/h';

function createTagFunction(tagName: string): Function {
return function hyperscript(first: any, b?: any, c?: any): VNode {
if (isSelector(first)) {
if (typeof b !== 'undefined' && typeof c !== 'undefined') {
return h(tagName + first, b, c);
} else if (typeof b !== 'undefined') {
return h(tagName + first, b);
return function hyperscript(a: any, b?: any, c?: any): VNode {
const hasA = typeof a !== 'undefined';
const hasB = typeof b !== 'undefined';
const hasC = typeof c !== 'undefined';
if (isSelector(a)) {
if (hasB && hasC) {
return h(tagName + a, b, c);
} else if (hasB) {
return h(tagName + a, b);
} else {
return h(tagName + first, {});
return h(tagName + a, {});
}
} else if (!!b) {
return h(tagName, first, b);
} else if (!!first) {
return h(tagName, first);
} else if (hasC) {
return h(tagName + a, b, c);
} else if (hasB) {
return h(tagName, a, b);
} else if (hasA) {
return h(tagName, a);
} else {

@@ -28,0 +33,0 @@ return h(tagName, {});

@@ -349,2 +349,24 @@ "use strict";

});
it('should render correctly even if hyperscript-helper first is empty string', function (done) {
function app(sources) {
return {
DOM: xstream_1.default.of(lib_1.h4('', {}, ['Hello world'])),
};
}
var _a = run_1.setup(app, {
DOM: lib_1.makeDOMDriver(createRenderTarget()),
}), sinks = _a.sinks, sources = _a.sources, run = _a.run;
var dispose;
sources.DOM.select(':root').elements().drop(1).take(1).addListener({
next: function (root) {
var H4 = root.querySelector('h4');
assert.strictEqual(H4.textContent, 'Hello world');
setTimeout(function () {
dispose();
done();
});
},
});
dispose = run();
});
it('should render textContent "0" given hyperscript content value number 0', function (done) {

@@ -351,0 +373,0 @@ function app(sources) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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