src/modules/webrtc/qbWebRTCSession.js
function _prepareExtension(extension) {
    var ext = {};

    try {
        if ( ({}).toString.call(extension) === '[object Object]' ) {
            ext.userInfo = extension;
            ext = JSON.parse( JSON.stringify(ext).replace(/null/g, "\"\"") );
        } else {
            throw new Error('Invalid type of "extension" object.');
        }
    } catch (err) {
        Helpers.traceWarning(err.message);
    }

    return ext;
}
function _prepareExtension(extension) {
    var ext = {};

    try {
        if ( ({}).toString.call(extension) === '[object Object]' ) {
            ext.userInfo = extension;
            ext = JSON.parse( JSON.stringify(ext).replace(/null/g, "\"\"") );
        } else {
            throw new Error('Invalid type of "extension" object.');
        }
    } catch (err) {
        Helpers.traceWarning(err.message);
    }

    return ext;
}
function _prepareExtension ( extension ) { var ext = { } ; try { if ( ( { } ) . toString . call ( extension ) === '[object Object]' ) { ext . userInfo = extension ; ext = JSON . parse ( JSON . stringify ( ext ) . replace ( / null / g , "\"\"" ) ) ; } else { throw new Error ( 'Invalid type of "extension" object.' ) ; } } catch ( err ) { Helpers . traceWarning ( err . message ) ; } return ext ; }
private _prepareExtension - replace property null to empty string
return object with property or empty if extension didn't set
private _prepareExtension - replace property null to empty string return object with property or empty if extension didn t set