Comparing version 1.0.3 to 1.0.4
@@ -1,15 +0,1 @@ | ||
'use strict'; | ||
/** | ||
* Copy text to clipboard using `document.execCommand()`. | ||
* @param {string} text | ||
*/ | ||
module.exports = function (text) { | ||
var el = document.createElement('input'); | ||
el.type = 'text', el.value = text; | ||
document.body.appendChild(el); | ||
el.select(); | ||
document.execCommand('copy'); | ||
el.remove(); | ||
}; | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.copyr=t():e.copyr=t()}(this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){"use strict";e.exports=function(e){var t=document.createElement("input");t.type="text",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}}])}); |
{ | ||
"name": "copyr", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Copy text to the clipboard.", | ||
@@ -8,3 +8,3 @@ "main": "dist/index.js", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "babel src --presets babel-preset-es2015 --out-dir dist", | ||
"build": "webpack", | ||
"prepublish": "npm run build" | ||
@@ -29,5 +29,7 @@ }, | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-preset-es2015": "^6.24.1" | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-preset-env": "^1.6.1", | ||
"webpack": "^3.8.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
Copy text to the clipboard. | ||
A small (under 1KB) module for copying text to the clipboard. | ||
@@ -3,0 +3,0 @@ Only uses `document.execCommand('copy')`. There are no fallbacks or other unnecessary code. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3068
4
4
0
1