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

0.0.6 • 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

8

Version

0.0.6

License

ISC

Unpacked Size

5.34 kB

Total Files

14

Last publish

Collaborators

  • abasb75