vendor/kinetic-v5.1.0.js
function(layer) {
            var layers = this.layers,
                len, n;

            if (layers) {
                len = layers.length;

                // don't add the layer if it already exists
                for (n = 0; n < len; n++) {
                    if (layers[n]._id === layer._id) {
                        return false;
                    }
                }
            }
            else {
                this.layers = [];
            }

            this.layers.push(layer);
            return true;
        }
function(layer) {
            var layers = this.layers,
                len, n;

            if (layers) {
                len = layers.length;

                // don't add the layer if it already exists
                for (n = 0; n < len; n++) {
                    if (layers[n]._id === layer._id) {
                        return false;
                    }
                }
            }
            else {
                this.layers = [];
            }

            this.layers.push(layer);
            return true;
        }
function ( layer ) { var layers = this . layers , len , n ; if ( layers ) { len = layers . length ; // don't add the layer if it already exists for ( n = 0 ; n < len ; n ++ ) { if ( layers [ n ] . _id === layer . _id ) { return false ; } } } else { this . layers = [ ] ; } this . layers . push ( layer ) ; return true ; }
add layer.  Returns true if the layer was added, and false if it was not
@method
@memberof Kinetic.Animation.prototype
@param {Kinetic.Layer} layer
add layer . Returns true if the layer was added and false if it was not