Add hasChildren() function with specs

I used your lib for a commercial project and added a small function that checks if a node has children.