initial commit (work in progress)

This commit is contained in:
Leo Horie 2016-04-20 20:02:37 -04:00
parent 13fdb60f66
commit 559369016d
83 changed files with 10461 additions and 0 deletions

View file

@ -0,0 +1,7 @@
module.exports = function normalizeChildren(children) {
for (var i = 0; i < children.length; i++) {
if (children[i] instanceof Array) children[i] = {tag: "[", key: undefined, attrs: undefined, children: normalizeChildren(children[i]), text: undefined}
else if (children[i] != null && typeof children[i] !== "object") children[i] = {tag: "#", key: undefined, attrs: undefined, children: children[i], text: undefined}
}
return children
}