vendor/kinetic-v5.1.0.js
function(config) {
            var key, method;

            if(config) {
                for(key in config) {
                    if (key === CHILDREN) {

                    }
                    else {
                        method = SET + Kinetic.Util._capitalize(key);
                        // use setter if available
                        if(Kinetic.Util._isFunction(this[method])) {
                            this[method](config[key]);
                        }
                        // otherwise set directly
                        else {
                            this._setAttr(key, config[key]);
                        }
                    }
                }
            }
            return this;
        }
function(config) {
            var key, method;

            if(config) {
                for(key in config) {
                    if (key === CHILDREN) {

                    }
                    else {
                        method = SET + Kinetic.Util._capitalize(key);
                        // use setter if available
                        if(Kinetic.Util._isFunction(this[method])) {
                            this[method](config[key]);
                        }
                        // otherwise set directly
                        else {
                            this._setAttr(key, config[key]);
                        }
                    }
                }
            }
            return this;
        }
function ( config ) { var key , method ; if ( config ) { for ( key in config ) { if ( key === CHILDREN ) { } else { method = SET + Kinetic . Util . _capitalize ( key ) ; // use setter if available if ( Kinetic . Util . _isFunction ( this [ method ] ) ) { this [ method ] ( config [ key ] ) ; } // otherwise set directly else { this . _setAttr ( key , config [ key ] ) ; } } } } return this ; }
set multiple attrs at once using an object literal
@method
@memberof Kinetic.Node.prototype
@param {Object} config object containing key value pairs
@returns {Kinetic.Node}
@example
node.setAttrs({<br>
x: 5,<br>
fill: 'red'<br>
});<br>
set multiple attrs at once using an object literal