feat: init
This commit is contained in:
19
node_modules/clipboardy/browser.js
generated
vendored
Normal file
19
node_modules/clipboardy/browser.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/* eslint-env browser */
|
||||
|
||||
const clipboard = {};
|
||||
|
||||
clipboard.write = async text => {
|
||||
await navigator.clipboard.writeText(text);
|
||||
};
|
||||
|
||||
clipboard.read = async () => navigator.clipboard.readText();
|
||||
|
||||
clipboard.readSync = () => {
|
||||
throw new Error('`.readSync()` is not supported in browsers!');
|
||||
};
|
||||
|
||||
clipboard.writeSync = () => {
|
||||
throw new Error('`.writeSync()` is not supported in browsers!');
|
||||
};
|
||||
|
||||
export default clipboard;
|
||||
Reference in New Issue
Block a user