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

Function simpleNormalizeChildren

static/vuejs/vue.runtime.common.js:1744–1751  ·  view source on GitHub ↗
(children)

Source from the content-addressed store, hash-verified

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