Gathering detailed insights and metrics for @charlietango/use-script
Gathering detailed insights and metrics for @charlietango/use-script
npm install @charlietango/use-script
Typescript
Module System
Node Version
NPM Version
70.9
Supply Chain
74.4
Quality
77.4
Maintenance
100
Vulnerability
100
License
TypeScript (97.35%)
JavaScript (2.65%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,069,888
Last Day
10
Last Week
10
Last Month
7,572
Last Year
180,843
76 Stars
204 Commits
10 Forks
5 Watching
2 Branches
7 Contributors
Minified
Minified + Gzipped
Latest Version
2.3.0
Package Id
@charlietango/use-script@2.3.0
Unpacked Size
9.46 kB
Size
3.01 kB
File Count
6
NPM Version
lerna/4.0.0/node@v17.5.0+x64 (darwin)
Node Version
17.5.0
Cumulative downloads
Total Downloads
Last day
0%
10
Compared to previous day
Last week
-99.2%
10
Compared to previous week
Last month
-9.2%
7,572
Compared to previous month
Last year
-29.6%
180,843
Compared to previous year
1
With useScript
you can lazy-load external third party scripts, that your
components might depend on. It checks if the requested url
already exists and reuses it, instead of creating a new load request.
Checkout the Storybook demo.
1yarn add @charlietango/use-script
1const [ready, status] = useScript(url)
The hook returns an array, where the first value is a boolean indicating if the script is ready.
The second value is the current loading status, that will be one of the ScriptStatus
enum values:
1enum ScriptStatus { 2 IDLE = 'idle', 3 LOADING = 'loading', 4 READY = 'loaded', 5 ERROR = 'error', 6}
1import React from 'react' 2import useScript, { ScriptStatus } from '@charlietango/use-script' 3 4const Component = () => { 5 const [ready, status] = useScript('https://api.google.com/api.js') 6 7 if (status === ScriptStatus.ERROR) { 8 return <div>Failed to load Google API</div> 9 } 10 11 return <div>Google API Ready: {ready}</div> 12} 13 14export default Component
No vulnerabilities found.
Reason
12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
Found 1/16 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-03
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