Socket
Book a DemoInstallSign in
Socket

org.webjars.npm:github-com-sindresorhus-copy-text-to-clipboard

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

org.webjars.npm:github-com-sindresorhus-copy-text-to-clipboard

WebJar for copy-text-to-clipboard

Source
mavenMaven
Version
1.0.4
Version published
Maintainers
1
Source

copy-text-to-clipboard Build Status

Copy text to the clipboard in modern browsers (0.2 kB)

Try it out!

Comparison

Install

$ npm install copy-text-to-clipboard

Usage

const copy = require('copy-text-to-clipboard');

button.addEventListener('click', () => {
	copy('🦄🌈');
});

API

copy(text)

Copy text to the clipboard.

Returns a boolean of whether it succeeded.

Must be called in response to a user gesture event, like click or keyup.

  • clipboardy - Access the system clipboard (copy/paste) in Node.js

License

MIT © Sindre Sorhus

FAQs

Package last updated on 01 Feb 2019

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