@abasb75/copy-to-clipboard
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published
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)

Package Sidebar

Install

npm i @abasb75/copy-to-clipboard

Weekly Downloads

2

Version

0.0.5

License

ISC

Unpacked Size

4.95 kB

Total Files

12

Last publish

Collaborators

  • abasb75