Gathering detailed insights and metrics for @charlietango/use-script
Gathering detailed insights and metrics for @charlietango/use-script
Gathering detailed insights and metrics for @charlietango/use-script
Gathering detailed insights and metrics for @charlietango/use-script
Collection of React Hooks used by Charlie Tango
npm install @charlietango/use-script
Typescript
Module System
Node Version
NPM Version
72.3
Supply Chain
74.4
Quality
77.4
Maintenance
100
Vulnerability
100
License
TypeScript (97.36%)
JavaScript (2.64%)
Total Downloads
1,115,966
Last Day
23
Last Week
2,399
Last Month
10,309
Last Year
156,510
MIT License
78 Stars
211 Commits
10 Forks
4 Watchers
3 Branches
7 Contributors
Updated on May 24, 2025
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
-50%
23
Compared to previous day
Last Week
14.6%
2,399
Compared to previous week
Last Month
-3%
10,309
Compared to previous month
Last Year
-34%
156,510
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
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
branch protection is not maximal on development and all release branches
Details
Reason
Found 0/15 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
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
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-23
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