I am having a prop which takes either a function or Component. So I want to differentiate by checking types of prop whether it's a component or function. I am at present using following one. This may not work in prod when code gets obfuscated. Wanted to know better solution?
let isSvelteComponent = component => {
return (
typeof component !== "undefined" &&
component.__proto__.name === "SvelteComponentDev"
);
};