New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nextui-org/use-clipboard

Package Overview
Dependencies
Maintainers
0
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextui-org/use-clipboard - npm Package Compare versions

Comparing version 0.0.0-canary-20241206144245 to 0.0.0-canary-20241228030715

6

dist/index.js

@@ -27,2 +27,5 @@ "use strict";

var import_react = require("react");
var transformValue = (text) => {
return text.replace(/[\u00A0]/g, " ");
};
function useClipboard({ timeout = 2e3 } = {}) {

@@ -48,3 +51,4 @@ const [error, setError] = (0, import_react.useState)(null);

if ("clipboard" in navigator) {
navigator.clipboard.writeText(valueToCopy).then(() => handleCopyResult(true)).catch((err) => setError(err));
const transformedValue = typeof valueToCopy === "string" ? transformValue(valueToCopy) : valueToCopy;
navigator.clipboard.writeText(transformedValue).then(() => handleCopyResult(true)).catch((err) => setError(err));
} else {

@@ -51,0 +55,0 @@ setError(new Error("useClipboard: navigator.clipboard is not supported"));

2

package.json
{
"name": "@nextui-org/use-clipboard",
"version": "0.0.0-canary-20241206144245",
"version": "0.0.0-canary-20241228030715",
"description": "Wrapper around navigator.clipboard with feedback timeout",

@@ -5,0 +5,0 @@ "keywords": [

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