
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600Ć Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
react-itertools
Advanced tools
A suite of tools for manipulating React children
A suite of tools for manipulating React children: each
, filter
, find
, groupBy
, map
, reduce
.
React.Children.map
and React.Children.forEach
provided by the React Children API iterate shallowly. The utilities in this library will descend the child tree and visit every child.
yarn add react-itertools
Just trying things out or want to skip the build step? Use the unpkg URL:
<script src="https://unpkg.com/react-itertools/dist/index.production.js"></script>
import { map } from "react-itertools";
import { isValidElement } from "react";
const MapExample = ({ children }) => {
const fn = (el) => {
return (
<div
style={{
border: "1px solid black",
padding: "10px",
backgroundColor: "blanchedalmond",
}}
>
{isValidElement(el) && el.props.children}
</div>
);
};
return <>{map(children, fn)}</>;
};
export default function App() {
return (
<>
<p>
`map` recursively iterates through all `children` and returns the
transformed result of applying `fn` to each child.
</p>
<p>Recurses depth first, post-order.</p>
<MapExample>
<div>
<div>
<div />
<div />
</div>
<div>
<div />
<div />
</div>
</div>
</MapExample>
</>
);
}
š Zero run time dependencies
𦶠Small footprint
š² Tree shakeable
šŖ Isomorphic / Universal -- safe to run in any JS context: the browser or on a server
PR's and issues welcomed! For more guidance check out CONTRIBUTING.md
See the project's MIT License.
FAQs
A suite of tools for manipulating React children
The npm package react-itertools receives a total of 0 weekly downloads. As such, react-itertools popularity was classified as not popular.
We found that react-itertools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.