Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

copy-to-clipboard

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copy-to-clipboard

Copy stuff into clipboard using JS with fallbacks

  • 3.2.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is copy-to-clipboard?

The copy-to-clipboard package is a simple and versatile tool for copying text to the clipboard in web applications. It provides an easy-to-use API that works across different browsers and platforms, making it a popular choice for developers looking to implement copy functionality without dealing with the complexities of the Clipboard API directly.

What are copy-to-clipboard's main functionalities?

Copy text to clipboard

This feature allows you to copy a specified string of text to the user's clipboard. It's useful for copying content like URLs, codes, or any text content that users might want to use outside the web application.

copy('Text to be copied');

Copy with options

This feature enhances the basic copy functionality by allowing you to pass an options object. The 'debug' option enables console output for debugging, and the 'message' option allows you to customize the instruction message shown to users on how to copy when automatic copying fails (useful for older browsers).

copy('Text to be copied', { debug: true, message: 'Press #{key} to copy' });

Other packages similar to copy-to-clipboard

Keywords

FAQs

Package last updated on 03 Feb 2020

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc