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

copyr

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

copyr - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

16

dist/index.js

@@ -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()}}])});

10

package.json
{
"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.

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