Categories

ep.mixin()

Categories: Utilities

ep.mixin()

Plugin: ep.core

Description: Merge the contents of two or more objects together into the first object.

  • ep.mixin()

    version added: 6.11.0

The ep.mixin() methods works like the jQuery.mixin() method.

Attention:

If only one argument is supplied to ep.extend(), this means the target argument was omitted. In this case, the ep object itself is assumed to be the target. By doing this, we can add new functions to the ep namespace.

  • Extend the ep object with some methods.

    Code:
    ep.mixin({
        bar: function(){
        },
        foo: function(){
        }
    });
    // will add the bar and foo method to the ep namespace
    ep.bar();
    
    ep.foo();