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

@solid-primitives/props

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/props - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

31

dist/index.js

@@ -69,3 +69,2 @@ import { $PROXY, createMemo, mergeProps } from 'solid-js';

var extractCSSregex = /([^:; ]*):\s*([^;]*)/g;
var isEventListenerKey = (key) => key[0] === "o" && key[1] === "n" && key.length > 2 && key[2] !== ":" && !key.startsWith("oncapture:");
function stringStyleToObject(style) {

@@ -106,23 +105,11 @@ const object = {};

for (const key in propsObj) {
if (!isEventListenerKey(key))
continue;
const v = propsObj[key];
const name = key.toLowerCase();
let callback;
if (typeof v === "function")
callback = v;
else if (Array.isArray(v)) {
if (v.length === 1)
callback = v[0];
if (key[0] === "o" && key[1] === "n" && key[2]) {
const v = propsObj[key];
const name = key.toLowerCase();
const callback = typeof v === "function" ? v : Array.isArray(v) ? v.length === 1 ? v[0] : v[0].bind(void 0, v[1]) : void 0;
if (callback)
listeners[name] ? listeners[name].push(callback) : listeners[name] = [callback];
else
callback = v[0].bind(void 0, v[1]);
} else {
delete listeners[name];
continue;
delete listeners[name];
}
const callbacks = listeners[name];
if (!callbacks)
listeners[name] = [callback];
else
callbacks.push(callback);
}

@@ -147,5 +134,5 @@ }

}
if (isEventListenerKey(key)) {
if (key[0] === "o" && key[1] === "n" && key[2]) {
const callbacks = listeners[key.toLowerCase()];
return Array.isArray(callbacks) ? chain(callbacks) : Reflect.get(merge, key);
return callbacks ? chain(callbacks) : Reflect.get(merge, key);
}

@@ -152,0 +139,0 @@ if (key === "class" || key === "className")

{
"name": "@solid-primitives/props",
"version": "3.0.5",
"version": "3.0.6",
"description": "Library of primitives focused around component props.",

@@ -5,0 +5,0 @@ "author": "Damian Tarnawski <gthetarnav@gmail.com>",

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