Socket
Socket
Sign inDemoInstall

clipboard-copy-paste-helper

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clipboard-copy-paste-helper

Simplify clipboard operations (copy and paste) in web applications.


Version published
Weekly downloads
6
decreased by-92%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

clipboard-copy-paste-helper

A utility library for simplifying clipboard operations (copy and paste) in web applications.

Installation

To install clipboard-copy-paste-helper, run:

npm install clipboard-copy-paste-helper

Usage

The library provides two main functions: copyTextToClipboard for copying text to the clipboard, and pasteTextFromClipboard for pasting text from the clipboard.

Copying Text to Clipboard

const { copyTextToClipboard } = require('clipboard-copy-paste-helper');

copyTextToClipboard('Hello, world!').then(() => {
console.log('Text copied successfully!');
});

Pasting Text from Clipboard

const { pasteTextFromClipboard } = require('clipboard-copy-paste-helper');

pasteTextFromClipboard().then(text => {
console.log('Pasted text:', text);
});

Note: Clipboard operations require user interaction in most browsers (e.g., inside a click event handler) and may also require specific permissions or secure contexts (https).

License

This project is licensed under the MIT License.

Keywords

FAQs

Last updated on 17 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc