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

clippie

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clippie - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

10

index.js
export async function clippie(content) {
if (content instanceof Blob) {
const item = new ClipboardItem({[content.type]: content});
const item = new ClipboardItem({[content.type]: content}); // eslint-disable-line no-undef
await navigator.clipboard.write([item]);

@@ -9,3 +9,3 @@ } else {

} catch {
return fallbackCopyToClipboard(content);
return fallback(content);
}

@@ -18,12 +18,12 @@ }

if (!document.execCommand) return false;
const tempTextArea = document.createElement('textarea');
const tempTextArea = document.createElement("textarea");
tempTextArea.value = text;
tempTextArea.style.top = 0;
tempTextArea.style.left = 0;
tempTextArea.style.position = 'fixed';
tempTextArea.style.position = "fixed";
document.body.appendChild(tempTextArea);
tempTextArea.select();
const success = document.execCommand('copy');
const success = document.execCommand("copy");
document.body.removeChild(tempTextArea);
return success;
}
{
"name": "clippie",
"version": "1.0.0",
"version": "1.0.1",
"description": "Teeny-tiny browser clipboard copy",

@@ -16,3 +16,3 @@ "author": "silverwind",

"eslint": "8.28.0",
"eslint-config-silverwind": "62.0.1",
"eslint-config-silverwind": "63.0.0",
"updates": "13.2.1",

@@ -19,0 +19,0 @@ "versions": "10.2.4"

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