joint.all.js
function(idx, value) {

        idx = idx || 0;
        
        var labels = this.get('labels') || [];
        
        // Is it a getter?
        if (arguments.length === 0 || arguments.length === 1) {
            
            return labels[idx];
        }

        var newValue = _.merge({}, labels[idx], value);

        var newLabels = labels.slice();
        newLabels[idx] = newValue;
        
        return this.set({ labels: newLabels });
    }
function(idx, value) {

        idx = idx || 0;
        
        var labels = this.get('labels') || [];
        
        // Is it a getter?
        if (arguments.length === 0 || arguments.length === 1) {
            
            return labels[idx];
        }

        var newValue = _.merge({}, labels[idx], value);

        var newLabels = labels.slice();
        newLabels[idx] = newValue;
        
        return this.set({ labels: newLabels });
    }
function ( idx , value ) { idx = idx || 0 ; var labels = this . get ( 'labels' ) || [ ] ; // Is it a getter? if ( arguments . length === 0 || arguments . length === 1 ) { return labels [ idx ] ; } var newValue = _ . merge ( { } , labels [ idx ] , value ) ; var newLabels = labels . slice ( ) ; newLabels [ idx ] = newValue ; return this . set ( { labels : newLabels } ) ; }
A convenient way to set labels. Currently set values will be mixined with `value` if used as a setter.
A convenient way to set labels . Currently set values will be mixined with value if used as a setter .