MCPcopy Index your code
hub / github.com/TruthHun/BookStack / simpleNormalizeChildren

Function simpleNormalizeChildren

static/vuejs/vue.runtime.esm.js:1742–1749  ·  view source on GitHub ↗
(children)

Source from the content-addressed store, hash-verified

1740// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
1741// because functional components already normalize their own children.
1742function simpleNormalizeChildren (children) {
1743 for (var i = 0; i < children.length; i++) {
1744 if (Array.isArray(children[i])) {
1745 return Array.prototype.concat.apply([], children)
1746 }
1747 }
1748 return children
1749}
1750
1751// 2. When the children contains constructs that always generated nested Arrays,
1752// 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