lib/collection/script.js
function (options) {
        // no splitting is being done here, as string scripts are split right before assignment below anyway
        (_.isString(options) || _.isArray(options)) && (options = { exec: options });

        if (!options) { return; } // in case definition object is missing, there is no point moving forward

        // create the request property
        /**
         * @augments {Script.prototype}
         * @type {string}
         */
        this.type = options.type || 'text/javascript';
        options.hasOwnProperty('src') && (

            /**
             * @augments {Script.prototype}
             * @type {Url}
             */
            this.src = new Url(options.src)
        );

        if (!this.src && options.hasOwnProperty('exec')) { // eslint-disable-line no-prototype-builtins
            /**
             * @augments {Script.prototype}
             * @type {Array<string>}
             */
            this.exec = _.isString(options.exec) ? options.exec.split(SCRIPT_NEWLINE_PATTERN) :
                _.isArray(options.exec) ? options.exec : undefined;
        }
    }
function (options) {
        // no splitting is being done here, as string scripts are split right before assignment below anyway
        (_.isString(options) || _.isArray(options)) && (options = { exec: options });

        if (!options) { return; } // in case definition object is missing, there is no point moving forward

        // create the request property
        /**
         * @augments {Script.prototype}
         * @type {string}
         */
        this.type = options.type || 'text/javascript';
        options.hasOwnProperty('src') && (

            /**
             * @augments {Script.prototype}
             * @type {Url}
             */
            this.src = new Url(options.src)
        );

        if (!this.src && options.hasOwnProperty('exec')) { // eslint-disable-line no-prototype-builtins
            /**
             * @augments {Script.prototype}
             * @type {Array<string>}
             */
            this.exec = _.isString(options.exec) ? options.exec.split(SCRIPT_NEWLINE_PATTERN) :
                _.isArray(options.exec) ? options.exec : undefined;
        }
    }
function ( options ) { // no splitting is being done here, as string scripts are split right before assignment below anyway ( _ . isString ( options ) || _ . isArray ( options ) ) && ( options = { exec : options } ) ; if ( ! options ) { return ; } // in case definition object is missing, there is no point moving forward // create the request property /**
         * @augments {Script.prototype}
         * @type {string}
         */ this . type = options . type || 'text/javascript' ; options . hasOwnProperty ( 'src' ) && ( /**
             * @augments {Script.prototype}
             * @type {Url}
             */ this . src = new Url ( options . src ) ) ; if ( ! this . src && options . hasOwnProperty ( 'exec' ) ) { // eslint-disable-line no-prototype-builtins /**
             * @augments {Script.prototype}
             * @type {Array<string>}
             */ this . exec = _ . isString ( options . exec ) ? options . exec . split ( SCRIPT_NEWLINE_PATTERN ) : _ . isArray ( options . exec ) ? options . exec : undefined ; } }
Updates the properties of a Script.

@param {Object} [options]
@param {String} [options.type] Script type
@param {String} [options.src] Script source url
@param {String[]|String} [options.exec] Script to execute
Updates the properties of a Script .