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

shadow-component

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shadow-component - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

30

babel/create.js

@@ -28,19 +28,29 @@ import Builder from './builder'

return {
render () {
let result = view.bind(this)()
if (typeof result === 'function') {
result.bind(this)()
render: function render(reRender) {
if (!reRender) {
renderElement(view, this)
} else {
patch(this, function(scope) {
renderElement(view, scope)
}, this)
}
}
};
}
function renderElement (view, scope) {
var result = view.bind(scope)();
if (typeof result === 'function') {
result.bind(scope)();
}
}
function setStateFactory () {
function setStateFactory() {
return {
setState (newState) {
this.state = Object.assign({}, this.state, newState)
this.render()
return this.state
setState: function setState(newState, force = false) {
this.state = Object.assign({}, this.state, newState);
this.render(force);
return this.state;
}
}
};
}

@@ -47,0 +57,0 @@

{
"name": "shadow-component",
"version": "0.1.7",
"version": "0.1.8",
"description": "This is a test implementation of components with shadow dom and full template rendering of changes of state",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -42,6 +42,9 @@ 'use strict';

return {
render: function render() {
var result = view.bind(this)();
if (typeof result === 'function') {
result.bind(this)();
render: function render(reRender) {
if (!reRender) {
renderElement(view, this);
} else {
(0, _incrementalDom.patch)(this, function (scope) {
renderElement(view, scope);
}, this);
}

@@ -52,7 +55,16 @@ }

function renderElement(view, scope) {
var result = view.bind(scope)();
if (typeof result === 'function') {
result.bind(scope)();
}
}
function setStateFactory() {
return {
setState: function setState(newState) {
var force = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
this.state = Object.assign({}, this.state, newState);
this.render();
this.render(force);
return this.state;

@@ -59,0 +71,0 @@ }

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