Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

17 linhas
393 B

  1. /* eslint-env browser */
  2. 'use strict';
  3. export const write = async text => {
  4. await navigator.clipboard.writeText(text);
  5. };
  6. export const read = async () => navigator.clipboard.readText();
  7. export const readSync = () => {
  8. throw new Error('`.readSync()` is not supported in browsers!');
  9. };
  10. export const writeSync = () => {
  11. throw new Error('`.writeSync()` is not supported in browsers!');
  12. };