I needed some util functions for manipulating styleguide object created by SC5 styleguide generator. This propably is compatible with KSS generated json files too.
All functions are functional. See tests for examples
sgUtils.getDepth('1.2')
// --> 1
Takes in styleguide object (generated by SC5 styleguide generator or possibly KSS) and strips it to navigation parts only. This can be useful for dynamically generating styleguide navigation. Return Sections as a flat array.
Same as above, but arranges sections into tree.