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

react-children-utilities

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-children-utilities - npm Package Compare versions

Comparing version 2.2.4 to 2.2.5

2

lib/hasChildren.d.ts
import type { ReactElement, ReactNode } from 'react';
declare const hasChildren: (element: ReactNode) => element is ReactElement<{
children: ReactNode[];
}, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
}, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
export default hasChildren;
//# sourceMappingURL=hasChildren.d.ts.map
import type { ReactElement, ReactNode } from 'react';
declare const hasComplexChildren: (element: ReactNode) => element is ReactElement<{
children: ReactNode[];
}, string | ((props: any) => ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
}, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
export default hasComplexChildren;
//# sourceMappingURL=hasComplexChildren.d.ts.map
import { Children, isValidElement } from 'react';
import hasChildren from './hasChildren';
// eslint-disable-next-line @typescript-eslint/ban-types
export const childToString = (child) => {

@@ -5,0 +4,0 @@ if (typeof child === 'undefined' || child === null || typeof child === 'boolean') {

{
"name": "react-children-utilities",
"version": "2.2.4",
"version": "2.2.5",
"description": "Recursive and extended utils for React children opaque data structure",

@@ -43,3 +43,6 @@ "keywords": [

"format": "prettier --write ** ./* ./.??*",
"_postinstall": "husky install",
"lint": "eslint . --ext js,jsx,ts,tsx",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable",
"size": "bundlesize",

@@ -62,7 +65,7 @@ "test": "jest --coverage",

"@types/jest": "^26.0.20",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"all-contributors-cli": "^6.19.0",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"all-contributors-cli": "^6.20.0",
"bundlesize": "^1.0.0-beta.2",

@@ -74,3 +77,3 @@ "codecov": "^3.8.1",

"enzyme-adapter-react-16": "^1.15.6",
"eslint": "7.18.0",
"eslint": "7.20.0",
"eslint-config-airbnb": "^18.2.1",

@@ -84,5 +87,5 @@ "eslint-config-prettier": "^7.2.0",

"eslint-plugin-react-hooks": "^4.2.0",
"flow-bin": "^0.143.1",
"flow-bin": "^0.144.0",
"flowgen": "1.13.0",
"husky": "^4.3.8",
"husky": "^5.0.9",
"jest": "^26.6.3",

@@ -92,4 +95,5 @@ "jest-environment-enzyme": "^7.1.2",

"jest-junit": "^12.0.0",
"lint-staged": "^10.5.3",
"lint-staged": "^10.5.4",
"normalize.css": "^8.0.1",
"pinst": "^2.1.4",
"prettier": "^2.2.1",

@@ -102,6 +106,6 @@ "prettier-plugin-organize-imports": "^1.1.1",

"react-test-renderer": "^17.0.1",
"rollup": "^2.38.1",
"rollup": "^2.39.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.5.0",
"typescript": "^4.1.3"
"ts-jest": "^26.5.1",
"typescript": "^4.1.5"
},

@@ -108,0 +112,0 @@ "peerDependencies": {

@@ -21,6 +21,6 @@ /// <reference types="react" />

children: import("react").ReactNode[];
}, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
}, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
hasComplexChildren: (element: import("react").ReactNode) => element is import("react").ReactElement<{
children: import("react").ReactNode[];
}, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
}, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
onlyText: (children: import("react").ReactNode) => string;

@@ -31,5 +31,5 @@ map<T, C>(children: C | C[], fn: (child: C, index: number) => T): C extends null | undefined ? C : Exclude<T, boolean | null | undefined>[];

only<C_2>(children: C_2): C_2 extends any[] ? never : C_2;
toArray(children: string | number | boolean | {} | import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined): (string | number | {} | import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)> | import("react").ReactNodeArray | import("react").ReactPortal)[];
toArray(children: string | number | boolean | {} | import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | import("react").ReactNodeArray | import("react").ReactPortal | import("react").ReactNode[] | null | undefined): (string | number | {} | import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | import("react").ReactNodeArray | import("react").ReactPortal)[];
};
export default _default;
//# sourceMappingURL=react-children-utilities.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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