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

wc-react

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wc-react - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

12

dist/esm/Wc.js

@@ -53,3 +53,9 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */

}
return React.createElement(tag, { ref: (element) => this.setRef(element) }, this.props.children);
const allBools = {};
for (const key of Object.keys(this.props)) {
if (key && this.props[key] === true) {
allBools[key] = true;
}
}
return React.createElement(tag, Object.assign(Object.assign({}, allBools), { ref: (element) => this.setRef(element) }), this.props.children);
}

@@ -98,4 +104,4 @@ /**

}
if (this.isEventProp(prop, this.props)) {
this._element.removeEventListener(prop[2].toLowerCase() + prop.substring(3), this.props[prop]);
if (this.isEventProp(prop, this.props[prop])) {
this.removeEventListener(prop, this.props[prop]);
}

@@ -102,0 +108,0 @@ }

{
"name": "wc-react",
"version": "0.5.0",
"version": "0.5.1",
"description": "Web Components wrapper class for React",

@@ -5,0 +5,0 @@ "author": "metulev",

@@ -5,3 +5,3 @@ # React wrapper for web components

Use `wc-react` to simplify usage of web components in React. This is a is a light wrapper to helps manage events and props of the web component.
Use `wc-react` to simplify usage of web components in React. This is a light wrapper to help manage events and props of the web component.

@@ -8,0 +8,0 @@ ```tsx

@@ -72,6 +72,16 @@ /* eslint-disable @typescript-eslint/explicit-function-return-type */

}
const allBools = {};
for (const key of Object.keys(this.props)) {
if (key && this.props[key] === true) {
allBools[key] = true;
}
}
return React.createElement(
tag,
{ ref: (element: HTMLElement) => this.setRef(element) },
{
...allBools,
ref: (element: HTMLElement) => this.setRef(element)
},
this.props.children

@@ -128,7 +138,4 @@ );

if (this.isEventProp(prop, this.props)) {
this._element.removeEventListener(
prop[2].toLowerCase() + prop.substring(3),
this.props[prop]
);
if (this.isEventProp(prop, this.props[prop])) {
this.removeEventListener(prop, this.props[prop]);
}

@@ -261,2 +268,2 @@ }

return component;
};
};

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