0.0.5 • Published 1 year ago

@abasb75/copy-to-clipboard v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago
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 ... ');