small nitpick but I find negated ternary conditions a little weird vs `i = null == i ? parent.children.length : i`