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

@bulmil/react

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bulmil/react - npm Package Compare versions

Comparing version 0.26.0 to 0.26.1

10

dist/cjs/react-component-lib/createComponent.js

@@ -57,10 +57,16 @@ "use strict";

let propsToPass = Object.keys(cProps).reduce((acc, name) => {
const value = cProps[name];
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
const eventName = name.substring(2).toLowerCase();
if (typeof document !== 'undefined' && (0, utils_1.isCoveredByReact)(eventName)) {
acc[name] = cProps[name];
acc[name] = value;
}
}
else {
acc[name] = cProps[name];
// we should only render strings, booleans, and numbers as attrs in html.
// objects, functions, arrays etc get synced via properties on mount.
const type = typeof value;
if (type === 'string' || type === 'boolean' || type === 'number') {
acc[(0, utils_1.camelToDashCase)(name)] = value;
}
}

@@ -67,0 +73,0 @@ return acc;

12

dist/esm/react-component-lib/createComponent.js

@@ -13,3 +13,3 @@ var __rest = (this && this.__rest) || function (s, e) {

import React, { createElement } from 'react';
import { attachProps, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs, } from './utils';
import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs, } from './utils';
export const createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {

@@ -36,10 +36,16 @@ if (defineCustomElement !== undefined) {

let propsToPass = Object.keys(cProps).reduce((acc, name) => {
const value = cProps[name];
if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
const eventName = name.substring(2).toLowerCase();
if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {
acc[name] = cProps[name];
acc[name] = value;
}
}
else {
acc[name] = cProps[name];
// we should only render strings, booleans, and numbers as attrs in html.
// objects, functions, arrays etc get synced via properties on mount.
const type = typeof value;
if (type === 'string' || type === 'boolean' || type === 'number') {
acc[camelToDashCase(name)] = value;
}
}

@@ -46,0 +52,0 @@ return acc;

{
"name": "@bulmil/react",
"sideEffects": false,
"version": "0.26.0",
"version": "0.26.1",
"author": "Gomah",

@@ -44,3 +44,3 @@ "license": "MIT",

"dependencies": {
"@bulmil/core": "0.26.0"
"@bulmil/core": "0.26.1"
},

@@ -51,3 +51,3 @@ "peerDependencies": {

},
"gitHead": "c08b02518821679638dc8ba662b46910b219a94f"
"gitHead": "018163f8f815b79e428ac1bec1a7c1dc7e336fa2"
}

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