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

piral-core

Package Overview
Dependencies
Maintainers
1
Versions
1027
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

piral-core - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1-pre.694

src/utils/components.test.tsx

5

lib/utils/components.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isNotExotic(component) {
return !component.$$typeof;
}
function markReact(arg, displayName) {

@@ -10,3 +13,3 @@ if (arg && !arg.displayName) {

function convertComponent(converters, component, displayName) {
if (typeof component === 'object') {
if (typeof component === 'object' && isNotExotic(component)) {
const converter = converters[component.type];

@@ -13,0 +16,0 @@ if (typeof converter !== 'function') {

4

package.json
{
"name": "piral-core",
"version": "0.8.0",
"version": "0.8.1-pre.694",
"description": "The core library for creating a Piral instance.",

@@ -54,3 +54,3 @@ "keywords": [

},
"gitHead": "57dd5aff0ba728c60757a37f9072952d04795fb2"
"gitHead": "6dc0fb0d63771173d10558d61008adc72a829eaa"
}

@@ -1,4 +0,8 @@

import { ComponentType } from 'react';
import { ComponentType, ExoticComponent } from 'react';
import { AnyComponent, ComponentConverters } from '../types';
function isNotExotic(component: any): component is object {
return !(component as ExoticComponent).$$typeof;
}
export function markReact<T>(arg: ComponentType<T>, displayName: string) {

@@ -15,3 +19,3 @@ if (arg && !arg.displayName) {

) {
if (typeof component === 'object') {
if (typeof component === 'object' && isNotExotic(component)) {
const converter = converters[component.type];

@@ -18,0 +22,0 @@

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