Function: copyLink()
ts
function copyLink(url, title?): Promise<boolean>;Copies a URL (and optional title) to the clipboard.
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The URL to copy. |
title? | string | Optional title prepended before the URL. |
Returns
Promise<boolean>
true when the copy succeeded.
Example
ts
console.log(await copyLink('https://example.com', 'Example'))Since
1.0.0