JSFiddle - React, Tailwind, and code Playground

JavaScript

window.Test = ({
    attribute1:'This is',
    attribute2:'a test',
    function1: function(data){
        alert(this.attribute1 + ' ' + this.attribute2+data.test);
    }
});
da = {test:'asd'};
das = {test:'works'};
//TEST 1
Test.function1(das); // "This is a test"

//TEST 2
var tester =  jQuery.extend(true,{}, Test);
tester.function1(da);