JSFiddle - React, Tailwind, and code Playground

by Chase Wilson

JavaScript

is = function (something) {
    var grrr = {
         equalTo: function (that) {
            return something === that;
        }
        ,a: {
            string: function() {
                return typeof something === 'string';
            },
            array: function () {
                return !!(something.map);
            }
        }
    };
    
    grrr.an = {array: grrr.a.array };
            
    return grrr
}
        
        

console.log(is('this').equalTo('this'));
console.log(is('this').a.string());
console.log(is([]).an.array());