Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 751 Bytes

readme.MD

File metadata and controls

20 lines (14 loc) · 751 Bytes

Build Status

Styleguide-utils

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

.getDepth()

sgUtils.getDepth('1.2')
// --> 1

.sgNavigation()

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.

.sgNavigationTree()

Same as above, but arranges sections into tree.