src/util.js
function typeForExtend(val) {
    // treat unknown types (classes, hopefully?) and functions as objects
    let type = getType(val);
    if (type === types.function || !typeset.has(type) && type && type.constructor)
        type = types.object;
    return type;
}
function typeForExtend(val) {
    // treat unknown types (classes, hopefully?) and functions as objects
    let type = getType(val);
    if (type === types.function || !typeset.has(type) && type && type.constructor)
        type = types.object;
    return type;
}
function typeForExtend ( val ) { // treat unknown types (classes, hopefully?) and functions as objects
 let type = getType ( val ) ; if ( type === types . function || ! typeset . has ( type ) && type && type . constructor ) type = types . object ; return type ; }
Internal method determining which type
to utilize for a provided value when using extend.

This is to be used so types for classes
and functions can be considered as objects.

@param val The first item to compare.
@param y The second item to compare.
@param rc The running counter for comparing circular references.
@returns {boolean} An indication as to whether or not x and y were equal.
Internal method determining which type to utilize for a provided value when using extend .