Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idyll-lang/idyll-component-children
Utilities for manipulating children components
https://github.com/idyll-lang/idyll-component-children
Last synced: 14 days ago
JSON representation
Utilities for manipulating children components
- Host: GitHub
- URL: https://github.com/idyll-lang/idyll-component-children
- Owner: idyll-lang
- License: mit
- Created: 2018-03-20T22:52:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-09T21:16:01.000Z (over 2 years ago)
- Last Synced: 2024-10-30T00:54:56.523Z (21 days ago)
- Language: JavaScript
- Size: 48.8 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idyll-component-children
Utilities for manipulating children components## Usage
```js
const { filterChildren, mapChildren } = require('idyll-component-children');filterChildren(children, (c) => {
// Filter for components named 'mycomponent'
return c.type.name && c.type.name.toLowerCase() === 'mycomponent';
})mapChildren(children, (c) => {
// .. do some modification to the child
return c;
})```