- Copy text to clipboard
- Check if the current user is on an Apple device
const copyToClipboard = text =>
(navigator.clipboard?.writeText?.(text));
const isAppleDevice =/Mac|iPod|iPhone|iPad/.text(navigator.platform);
console.log(isAppleDevice)
// Result: will return true if user is on an Apple device.