styledoc.js
function getUniqueItemId(selector) {

            var base_id = selectorToId(selector),
                id = base_id,
                numeric_suffix = 0;

            while (used_item_ids.indexOf(id) !== -1) {
                id = base_id + "_" + ++numeric_suffix;
            }

            used_item_ids.push(id);
            return id;
        }
function getUniqueItemId(selector) {

            var base_id = selectorToId(selector),
                id = base_id,
                numeric_suffix = 0;

            while (used_item_ids.indexOf(id) !== -1) {
                id = base_id + "_" + ++numeric_suffix;
            }

            used_item_ids.push(id);
            return id;
        }
function getUniqueItemId ( selector ) { var base_id = selectorToId ( selector ) , id = base_id , numeric_suffix = 0 ; while ( used_item_ids . indexOf ( id ) !== - 1 ) { id = base_id + "_" + ++ numeric_suffix ; } used_item_ids . push ( id ) ; return id ; }
Converts selector to ID and assures it is unique
@param {string} selector
@returns {string}
@todo dry?
Converts selector to ID and assures it is unique