🚀 DAY 3 OF LAUNCH WEEK:Announcing Bun and vlt Support in Socket.Learn more →
Socket
Book a DemoInstallSign in
Socket

@abasb75/copy-to-clipboard

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abasb75/copy-to-clipboard

a tools for copy to clipboard

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
0
Created
Source
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)

Keywords

copy

FAQs

Package last updated on 21 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts