npm package of custom-protocol-detection.
the lib is npm package of custom-protocol-detection. you can use it check custom protocol whether installed in your device. If protocol is installed, it will be launch via broswer.
this is online demo. It will open your eamil app. try
npm i custom-protocol-detection-pkg
import cpd from "custom-protocol-detection-pkg";
cpd(
"mailto:johndoe@somewhere.com",
() => {
console.log("failed")
},
() => {
console.log("successed")
},
() => {
console.log("unsupported")
}
);
MIT @hemengke1997