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

@marcoms/make-element

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

@marcoms/make-element - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

28

build/make-element.js

@@ -92,2 +92,10 @@ (function webpackUniversalModuleDefinition(root, factory) {

}
function convertToBoolAttr(val) {
if (Boolean(val)) {
return '';
}
else {
return undefined;
}
}
function makeElement(def = {}) {

@@ -129,5 +137,11 @@ const props = def.props || {};

}
let boolAttr = false;
if (typeof propDef.boolAttr === 'boolean') {
boolAttr = propDef.boolAttr;
}
let toAttr = identity;
if (typeof propDef.toAttr === 'function') {
// this === element instance
if (boolAttr) {
toAttr = convertToBoolAttr;
}
else if (typeof propDef.toAttr === 'function') {
toAttr = propDef.toAttr;

@@ -156,2 +170,3 @@ }

attr: attrName,
boolAttr,
// function used to produce an attribute value from a

@@ -211,4 +226,9 @@ // property value

internalAttr.needsPropagation = false;
// invoke attributeChangedCallback
this.setAttribute(attrName, attrVal);
if (attrVal !== undefined) {
// invoke attributeChangedCallback
this.setAttribute(attrName, attrVal);
}
else {
this.removeAttribute(attrName);
}
}

@@ -215,0 +235,0 @@ internalProp.hasSet = true;

2

package.json
{
"name": "@marcoms/make-element",
"version": "4.1.0",
"version": "4.1.1",
"description": "Create custom elements without boilerplate",

@@ -5,0 +5,0 @@ "main": "build/make-element.js",

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