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

v-clipboard

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-clipboard - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/index.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["v-clipboard"]=t():e["v-clipboard"]=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){var t=document.createElement("textarea"),n=!1;t.value=e,t.style.cssText="position:fixed;pointer-events:none;z-index:-9999;opacity:0;",document.body.appendChild(t),t.select();try{n=document.execCommand("copy")}catch(e){}return document.body.removeChild(t),n};t.default={install:function(e){e.prototype.$clipboard=o,e.directive("clipboard",{bind:function(e,t,n){e.addEventListener("click",function(e){if(t.hasOwnProperty("value")){var r=t.value,c={value:r,srcEvent:e},i=n.context;o(r)?i.$emit("copy",c):i.$emit("copyError",c)}})}})}}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["v-clipboard"]=t():e["v-clipboard"]=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){if("string"!=typeof e)try{e=JSON.stringify(e)}catch(e){throw"Failed to copy value to clipboard. Unknown type."}var t=document.createElement("textarea"),r=!1;t.value=e,t.style.cssText="position:fixed;pointer-events:none;z-index:-9999;opacity:0;",document.body.appendChild(t),t.select();try{r=document.execCommand("copy")}catch(e){console.warn(e)}return document.body.removeChild(t),r};t.default={install:function(e){e.prototype.$clipboard=n;var t=function(e){return function(){return"$"+e++}}(1),r={},o=function(e){e&&(r[e]=null,delete r[e])},c=function(e){var n=t();return r[n]=e,n};e.directive("clipboard",{bind:function(e,t,o){var a=t.arg,i=t.value;switch(a){case"error":var d=c(i);return void(e.dataset.clipboardErrorHandler=d);case"success":var u=c(i);return void(e.dataset.clipboardSuccessHandler=u);default:var l=function(o){if(t.hasOwnProperty("value")){var c={value:"function"==typeof i?i():i,event:o},a=n(c.value)?e.dataset.clipboardSuccessHandler:e.dataset.clipboardErrorHandler,d=r[a];d&&d(c)}},s=c(l);return e.dataset.clipboardClickHandler=s,void e.addEventListener("click",r[s])}},unbind:function(e,t,n){var c=e.dataset,a=c.clipboardSuccessHandler,i=c.clipboardErrorHandler,d=c.clipboardClickHandler;o(a),o(i),d&&(e.removeEventListener("click",r[d]),o(d))}})}}}])});
//# sourceMappingURL=index.min.js.map
{
"name": "v-clipboard",
"description": "Vue.js Clipboard Plugin",
"version": "2.0.0",
"version": "2.0.1",
"author": "euvl <yev.vlasenko@gmail.com>",

@@ -6,0 +6,0 @@ "private": false,

Sorry, the diff of this file is not supported yet

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