function inPosition(index, items) {
    for (var i = 0; i < items.length; i++) {
        var item = items[i];
        if (index >= item.start && index <= item.end) return item;
    }
    return false;
}
function inPosition(index, items) {
    for (var i = 0; i < items.length; i++) {
        var item = items[i];
        if (index >= item.start && index <= item.end) return item;
    }
    return false;
}
function inPosition ( index , items ) { for ( var i = 0 ; i < items . length ; i ++ ) { var item = items [ i ] ; if ( index >= item . start && index <= item . end ) return item ; } return false ; }
Finds if the index is inside one of the items
Items should be in the same format as returned from util.findPositions

@param {Number} index The index to check
@param {Array<{start: Number, end: Number}>} items The items to search
@returns {*} The start/end position if index is inside an item, else false
Finds if the index is inside one of the items Items should be in the same format as returned from util . findPositions