tru_extend

jQuery extend method extracted

Usage no npm install needed!

<script type="module">
  import truExtend from 'https://cdn.skypack.dev/tru_extend';
</script>

README

tru_extend

Use as jQuery $.extend() method

Usage

const extend = require('tru_extend');

var a = {
    toto: 'toto',
    tata: 'tata',
    a: {
        c: 'c'
    }
};

var b = {
    toto: 'toto2',
    titi: 'titi',
    a: {
        b: 'a'
    }
};

console.log(extend(true, a, b));
/*
{
    toto: 'toto2',
    tata: 'tata',
    a: {
        c: 'c',
        b: 'a'
    },
    titi: 'titi'
}
*/