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

@pap-it/system-react

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pap-it/system-react - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

dist/src/HOC.js

@@ -1,1 +0,1 @@

"use strict";import{jsx as l}from"react/jsx-runtime";import r from"react";export function papHOC(c){const o=r.forwardRef((t,u)=>{const n=r.useRef(null),i=r.useRef(new Set),[d,s]=r.useState(!1);r.useEffect(()=>{typeof u=="function"?u(n.current):u&&(u.current=n.current),n.current&&s(!0)},[n.current]);const f={class:t.className};if(n.current){for(let e in t)if(e!=="children")if(typeof t[e]=="function"){if(e.startsWith("on")){if(i.current.has(e))continue;const a=m(e);if(a){n.current.addEventListener(a,t[e]),i.current.add(e);continue}}n.current[e]=t[e]}else typeof t[e]=="object"?n.current[e]=t[e]:f[e]=t[e]}return l(c,{ref:n,...f,children:t.children})});return r.memo(o)}function m(c){return c.startsWith("on")?c.replace(/^on/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():null}
"use strict";import{jsx as l}from"react/jsx-runtime";import c from"react";export function papHOC(u){const a=c.forwardRef((t,i)=>{const n=c.useRef(null),f=c.useRef(new Map),[d,o]=c.useState(!1);c.useEffect(()=>{typeof i=="function"?i(n.current):i&&(i.current=n.current),n.current&&o(!0)},[n.current]);const s={class:t.className};if(n.current){for(let e in t)if(e!=="children")if(typeof t[e]=="function"){if(e.startsWith("on")){const r=m(e);if(r){f.current.has(r)&&n.current.removeEventListener(r,f.current.get(r)),n.current.addEventListener(r,t[e]),f.current.set(r,t[e]);continue}}n.current[e]=t[e]}else typeof t[e]=="object"?n.current[e]=t[e]:s[e]=t[e]}return l(u,{ref:n,...s,children:t.children})});return c.memo(a)}function m(u){return u.startsWith("on")?u.replace(/^on/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():null}
{
"name": "@pap-it/system-react",
"version": "0.0.7",
"version": "0.0.8",
"scripts": {

@@ -5,0 +5,0 @@ "test": ".scripts/test.sh",

@@ -5,3 +5,3 @@ # ReactSystem

Version: Version: Version: 0.0.7
Version: Version: Version: 0.0.8

@@ -11,2 +11,3 @@

## Development

@@ -13,0 +14,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