MCPcopy Create free account
hub / github.com/TruthHun/BookStack / simpleNormalizeChildren

Function simpleNormalizeChildren

static/vuejs/vue.js:1752–1759  ·  view source on GitHub ↗
(children)

Source from the content-addressed store, hash-verified

1750// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
1751// because functional components already normalize their own children.
1752function simpleNormalizeChildren (children) {
1753 for (var i = 0; i < children.length; i++) {
1754 if (Array.isArray(children[i])) {
1755 return Array.prototype.concat.apply([], children)
1756 }
1757 }
1758 return children
1759}
1760
1761// 2. When the children contains constructs that always generated nested Arrays,
1762// e.g. <template>, <slot>, v-for, or when the children is provided by user

Callers 1

_createElementFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected