Gathering detailed insights and metrics for use-clippy
Gathering detailed insights and metrics for use-clippy
npm install use-clippy
Typescript
Module System
Node Version
NPM Version
71.9
Supply Chain
87.3
Quality
75.8
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
252,760
Last Day
73
Last Week
739
Last Month
3,675
Last Year
35,995
MIT License
179 Stars
55 Commits
11 Forks
3 Watchers
15 Branches
4 Contributors
Updated on Feb 11, 2025
Minified
Minified + Gzipped
Latest Version
1.0.9
Package Id
use-clippy@1.0.9
Unpacked Size
14.77 kB
Size
4.68 kB
File Count
5
NPM Version
8.3.1
Node Version
16.14.0
Cumulative downloads
Total Downloads
Last Day
-31.8%
73
Compared to previous day
Last Week
-26.9%
739
Compared to previous week
Last Month
127%
3,675
Compared to previous month
Last Year
-20.8%
35,995
Compared to previous year
1
4
useClippy
is a TypeScript-friendly React hook for reading from and writing to
the user's clipboard.
Not to be confused with Microsoft Office's assistant, Clippy. 📎
You can see
use-clippy
in action via GitHub Pages,
which hosts the
demo
directory.
npm install use-clippy
oryarn add use-clippy
useClippy()
returns a tuple analogous to useState
, where the first item is
the clipboard contents and the second item is a function for setting the
clipboard contents.
1import React from 'react'; 2import useClippy from 'use-clippy'; 3 4export default function MyComponent() { 5 6 // clipboard is the contents of the user's clipboard. 7 // setClipboard('new value') wil set the contents of the user's clipboard. 8 const [clipboard, setClipboard] = useClippy(); 9 10 return ( 11 <div> 12 13 {/* Button that demonstrates reading the clipboard. */} 14 <button 15 onClick={() => { 16 alert(`Your clipboard contains: ${clipboard}`); 17 }} 18 > 19 Read my clipboard 20 </button> 21 22 {/* Button that demonstrates writing to the clipboard. */} 23 <button 24 onClick={() => { 25 setClipboard(`Random number: ${Math.random()}`); 26 }} 27 > 28 Copy something new 29 </button> 30 </div> 31 ); 32}
If you are a fan of this project, you may become a sponsor via GitHub's Sponsors Program.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/11 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
103 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More