Socket
Socket
Sign inDemoInstall

clipboard-copy-paste-helper

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

README.md

23

index.js

@@ -1,1 +0,22 @@

console.log('Init library')
// Function to copy text to the clipboard
async function copyTextToClipboard(text) {
try {
await navigator.clipboard.writeText(text);
console.log('Text copied to clipboard');
} catch (err) {
console.error('Failed to copy: ', err);
}
}
// Function to paste text from the clipboard
async function pasteTextFromClipboard() {
try {
const text = await navigator.clipboard.readText();
console.log('Text pasted from clipboard: ', text);
return text;
} catch (err) {
console.error('Failed to paste: ', err);
}
}
module.exports = { copyTextToClipboard, pasteTextFromClipboard };
{
"name": "clipboard-copy-paste-helper",
"version": "1.0.0",
"description": "",
"version": "1.0.1",
"description": "Simplify clipboard operations (copy and paste) in web applications.",
"main": "index.js",

@@ -9,2 +9,12 @@ "scripts": {

},
"keywords": [
"clipboard",
"copy",
"paste",
"text"
],
"repository": {
"type": "git",
"url": "https://github.com/eternaldarron/clipboard-copy-paste-helper"
},
"author": "",

@@ -11,0 +21,0 @@ "license": "MIT",

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