Call your functions using instanceof operator (drunk programming only)
npm install weird-instanceofSymbol.hasInstance hook of ES6, so this is not compilable to ES5. npm i weird-instanceof for Node.js for Browsers js
const WeirdInstanceof = require('weird-instanceof'); // Global 'WeirdInstanceof' is defined for browsersconst SuperAmazingCuttingEdgeFunction = WeirdInstanceof(arg => {
console.log(
State-of-art ${arg});
return true;
});1 instanceof SuperAmazingCuttingEdgeFunction; // State-of-art 1; true
abc instanceof SuperAmazingCuttingEdgeFunction; // State-of-art 2; true{} instanceof SuperAmazingCuttingEdgeFunction; // State-of-art {}; true
``That's it, thanks! 👾