src/Utility/Collection.js
/**
     * Add an object
     * If baseObject, add only if instance of baseObject
     * If no baseObject, add
     *
     * @param {String} value - The ID of the object
     * @param {Object} key - The object data
     * @param {Boolean} replace - Whether to replace an existing object with the same ID
     * @returns {Class} The existing or newly created object
     *
     * @memberof Collection
     */
Add an object
If baseObject, add only if instance of baseObject
If no baseObject, add

@param {String} value - The ID of the object
@param {Object} key - The object data
@param {Boolean} replace - Whether to replace an existing object with the same ID
@returns {Class} The existing or newly created object

@memberof Collection
Add an object If baseObject add only if instance of baseObject If no baseObject add @param { String } value - The ID of the object @param { Object } key - The object data @param { Boolean } replace - Whether to replace an existing object with the same ID @returns { Class } The existing or newly created object @memberof Collection
add(key, value, replace) {
        const existing = this.get(key);
        if (existing && !replace) {
            return existing;
        }
        if (this.baseObject && !(value instanceof this.baseObject) ) {
            return null;
        }
        this.set(key, value);
        return value;
    }
add ( key , value , replace ) { const existing = this . get ( key ) ; if ( existing && ! replace ) { return existing ; } if ( this . baseObject && ! ( value instanceof this . baseObject ) ) { return null ; } this . set ( key , value ) ; return value ; }
Add an object
 If baseObject, add only if instance of baseObject
 If no baseObject, add
Add an object If baseObject add only if instance of baseObject If no baseObject add