JSFiddle - React, Tailwind, and code Playground

JavaScript

(function() {
    test = function(selector) {
        return new test.prototype.init(selector);
    }
    test.prototype = {
        init: function(selector) {
            alert("init ran");
            if (!arguments[0]) {
                return this;
            }
        }
    }
 // As I understand the jQuery code, the next line should really be
 // test.prototype = {
    test.prototype.init.prototype = {
        send: function() {
            alert("send ran");
        }
    }

    window.ob = test;
})()

ob().send();