Gathering detailed insights and metrics for use-click-document
Gathering detailed insights and metrics for use-click-document
Gathering detailed insights and metrics for use-click-document
Gathering detailed insights and metrics for use-click-document
npm install use-click-document
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
13 Commits
2 Watching
3 Branches
1 Contributors
Updated on 07 Jul 2021
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-50%
2
Compared to previous week
Last month
33.3%
8
Compared to previous month
Last year
-7.3%
166
Compared to previous year
1
5
npm install use-click-document
1import React, { useCallback } from 'react'; 2import { useClickDocument } from 'use-click-document'; 3 4const SomeComponent = () => { 5 const onAnythingClick = useCallback((event: MouseEvent) => { 6 console.log('clicked anything', event.target); 7 }, []); 8 9 useClickDocument(onAnythingClick); 10 11 return <div>something</div>; 12};
1import React, { useCallback, useRef } from 'react'; 2import { useClickDocument } from 'use-click-document'; 3 4const SomeComponent = () => { 5 const refA = useRef<HTMLElement>(null); 6 const refB = useRef<HTMLElement>(null); 7 8 const onClickIgnoredAB = useCallback((event: MouseEvent) => { 9 console.log('clicked not a and b', event.target); 10 }, []); 11 12 useClickDocument(onClickIgnoredAB, [refA, refB]); 13 14 return ( 15 <div> 16 <div ref={refA}>A</div> 17 <div ref={refB}>B</div> 18 <div>C</div> 19 </div> 20 ); 21};
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
3 existing vulnerabilities detected
Details
Reason
Found 0/9 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
license file not detected
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
Score
Last Scanned on 2024-11-18
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