refactor: monorepo+pnpm (removed husky)

This commit is contained in:
Andrew Bastin
2021-09-10 00:28:28 +05:30
parent 917550ff4d
commit b28f82a881
445 changed files with 81301 additions and 63752 deletions

View File

@@ -0,0 +1,18 @@
/**
* Copies a given string to the clipboard using
* the legacy exec method
*
* @param content The content to be copied
*/
export function copyToClipboard(content: string) {
if (navigator.clipboard) {
navigator.clipboard.writeText(content)
} else {
const dummy = document.createElement("textarea")
document.body.appendChild(dummy)
dummy.value = content
dummy.select()
document.execCommand("copy")
document.body.removeChild(dummy)
}
}