Skip to content

abasb75/copy-to-clipboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm i @abasb75/copy-to-clipboard

It's work very simple:

import copy from '@abasb75/copy-to-clipboard';

copy(
   'my text for copy',
).then(
   ()=>{ console.log('this function execute after successfuly on copy') }, // optional
).catch(
   (err)=> { console.log('this function execute after error on copy') } //optional
);

also you can use this method for copy :

import copy from '@abasb75/copy-to-clipboard';

copy(
   'my text for copy', // required
   ()=>{ console.log('this function execute after successfuly on copy') }, // optional
   (err)=> { console.log('this function execute after error on copy') } //optional
);

if you don't need succuss or failure functions :

import copy from '@abasb75/copy-to-clipboard';

copy('some text ... ');

older version with smaller size (2.61kb)

About

a tools for copy to clipboard

Resources

Stars

Watchers

Forks

Packages

No packages published