Join.js
function pushOrPut (currentBin, index) {
            var temp = currentBin;
            if (Array.isArray(currentBin)) {
                if (currentBin.indexOf(index) === -1) {
                    currentBin.push(index);//only add if this is a unique index to prevent dup'ing indexes, and associations
                }
            } else {
                temp = [index];
            }
            return temp;
        }
function pushOrPut (currentBin, index) {
            var temp = currentBin;
            if (Array.isArray(currentBin)) {
                if (currentBin.indexOf(index) === -1) {
                    currentBin.push(index);//only add if this is a unique index to prevent dup'ing indexes, and associations
                }
            } else {
                temp = [index];
            }
            return temp;
        }
function pushOrPut ( currentBin , index ) { var temp = currentBin ; if ( Array . isArray ( currentBin ) ) { if ( currentBin . indexOf ( index ) === - 1 ) { currentBin . push ( index ) ; //only add if this is a unique index to prevent dup'ing indexes, and associations } } else { temp = [ index ] ; } return temp ; }
Put a new index value into the array at the given bin, making a new array if there is none.
@param currentBin The location in which to put the array
@param index the index value to put in the array
@returns the newly created array if there was one created. Must be assigned into the correct spot
Put a new index value into the array at the given bin making a new array if there is none .