
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
@ffsm/as-array
Advanced tools
A lightweight React utility component that allows passing the same props to multiple children at once, simplifying component composition and reducing repetitive code.
A lightweight React utility component that enables you to pass the same props to multiple children at once.
# Using npm
npm install @ffsm/as-array
# Using yarn
yarn add @ffsm/as-array
# Using pnpm
pnpm add @ffsm/as-array
import { AsArray } from '@ffsm/as-array';
function App() {
return (
<AsArray className="btn" disabled={true}>
<button>Save</button>
<button>Cancel</button>
<button>Reset</button>
</AsArray>
);
}
The code above will render three buttons, each with the className "btn" and the disabled attribute set to true.
import { AsArray } from '@ffsm/as-array';
function App() {
return (
<AsArray data-testid="test-element">
<div>First element</div>
Some text between elements
<div>Last element</div>
</AsArray>
);
}
The text node will be preserved while both div elements will receive the data-testid attribute.
import { AsArray } from '@ffsm/as-array';
function Form({ isReadOnly }) {
return (
<AsArray disabled={isReadOnly}>
<input type="text" name="name" />
<input type="email" name="email" />
<button type="submit">Submit</button>
</AsArray>
);
}
AsArrayThe main component exposed by this package.
Any props passed to AsArray will be forwarded to each child element. The component itself doesn't have any specific props aside from children.
The package includes TypeScript definitions. The AsArray component is fully typed:
import { AsArray } from '@ffsm/as-array';
function TypedExample() {
return (
<AsArray className="container" aria-label="group">
<div>TypeScript supported!</div>
</AsArray>
);
}
AsArray uses React's Children.toArray() to normalize and map through its children. For each child:
Fragment with a keycloneElement with merged props from both the original child and the AsArray componentThis package targets ES modules and works in all modern browsers that support React.
MIT
FAQs
A lightweight React utility component that allows passing the same props to multiple children at once, simplifying component composition and reducing repetitive code.
We found that @ffsm/as-array 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
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.