Socket
Socket
Sign inDemoInstall

clipboard

Package Overview
Dependencies
4
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

2

dist/clipboard.js
/*!
* clipboard.js v2.0.0
* clipboard.js v2.0.1
* https://zenorocha.github.io/clipboard.js

@@ -4,0 +4,0 @@ *

/*!
* clipboard.js v2.0.0
* clipboard.js v2.0.1
* https://zenorocha.github.io/clipboard.js

@@ -4,0 +4,0 @@ *

{
"name": "clipboard",
"version": "2.0.0",
"version": "2.0.1",
"description": "Modern copy to clipboard. No Flash. Just 2kb",

@@ -8,3 +8,3 @@ "repository": "zenorocha/clipboard.js",

"main": "dist/clipboard.js",
"module": "src/clipboard.js",
"module": "dist/clipboard.js",
"keywords": [

@@ -11,0 +11,0 @@ "clipboard",

@@ -37,3 +37,3 @@ # clipboard.js

```js
new Clipboard('.btn');
new ClipboardJS('.btn');
```

@@ -107,3 +107,3 @@

```js
var clipboard = new Clipboard('.btn');
var clipboard = new ClipboardJS('.btn');

@@ -139,3 +139,3 @@ clipboard.on('success', function(e) {

```js
new Clipboard('.btn', {
new ClipboardJS('.btn', {
target: function(trigger) {

@@ -150,3 +150,3 @@ return trigger.nextElementSibling;

```js
new Clipboard('.btn', {
new ClipboardJS('.btn', {
text: function(trigger) {

@@ -161,3 +161,3 @@ return trigger.getAttribute('aria-label');

```js
new Clipboard('.btn', {
new ClipboardJS('.btn', {
container: document.getElementById('modal')

@@ -170,3 +170,3 @@ });

```js
var clipboard = new Clipboard('.btn');
var clipboard = new ClipboardJS('.btn');
clipboard.destroy();

@@ -185,3 +185,3 @@ ```

You can also check if clipboard.js is supported or not by running `Clipboard.isSupported()`, that way you can hide copy/cut buttons from the UI.
You can also check if clipboard.js is supported or not by running `ClipboardJS.isSupported()`, that way you can hide copy/cut buttons from the UI.

@@ -188,0 +188,0 @@ ## Bonus

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