lib/sortedArray.js
function pushSingle(arr, element) {
    var index = arr.sortedIndex(element),
        _ = arr._sortedArray;

    // original push and unshift are faster than splice
    if (index === 0) {
        _.unshift.call(arr, element);
    } else if (index === arr.length) {
        _.push.call(arr, element);
    } else {
        _.splice.call(arr, index, 0, element);
    }
}
function pushSingle(arr, element) {
    var index = arr.sortedIndex(element),
        _ = arr._sortedArray;

    // original push and unshift are faster than splice
    if (index === 0) {
        _.unshift.call(arr, element);
    } else if (index === arr.length) {
        _.push.call(arr, element);
    } else {
        _.splice.call(arr, index, 0, element);
    }
}
function pushSingle ( arr , element ) { var index = arr . sortedIndex ( element ) , _ = arr . _sortedArray ; // original push and unshift are faster than splice if ( index === 0 ) { _ . unshift . call ( arr , element ) ; } else if ( index === arr . length ) { _ . push . call ( arr , element ) ; } else { _ . splice . call ( arr , index , 0 , element ) ; } }
Performs a push of a single element. Used by push, unshift, splice.

@private
@param {Array} arr
@param {*} element
Performs a push of a single element . Used by push unshift splice .