swayf/mongoose-path-tree — pull request #4 by angelo0000 (2014-03-12 14:54:11+00:00)
Title: Adding shortid to support deeper trees

Using the default object id only allows for a tree with a depth of ~40. Using shortids let us extend that depth of ~80 as the default shortid is 1/2 the length of an objectid.

Of note: Using this strategy breaks the assumption that children are sorted. I had to modify the tests that request the whole tree to find the appropriate tree to run expectations on.

I'm not sure how you could do this and maintain insertion order as the shortid is non sequential.