Function
normalizeChildren
(
children?: (DevComponent | string)[] | DevComponent | string
)
Source from the content-addressed store, hash-verified
| 343 | } |
| 344 | |
| 345 | function normalizeChildren( |
| 346 | children?: (DevComponent | string)[] | DevComponent | string |
| 347 | ): (DevComponent | string)[] { |
| 348 | if (children === undefined) { |
| 349 | return [] |
| 350 | } |
| 351 | |
| 352 | return Array.isArray(children) ? children : [children] |
| 353 | } |
| 354 | |
| 355 | /** |
| 356 | * Hyperscript helper to compose `DevComponent` trees from plugin code. |
Tested by
no test coverage detected