Gathering detailed insights and metrics for @use-hooks/image-size
Gathering detailed insights and metrics for @use-hooks/image-size
Gathering detailed insights and metrics for @use-hooks/image-size
Gathering detailed insights and metrics for @use-hooks/image-size
npm install @use-hooks/image-size
Typescript
Module System
Node Version
NPM Version
JavaScript (90.73%)
HTML (9.27%)
Total Downloads
32,343
Last Day
2
Last Week
42
Last Month
294
Last Year
4,450
19 Stars
17 Commits
2 Forks
2 Watching
3 Branches
3 Contributors
Latest Version
1.0.5
Package Id
@use-hooks/image-size@1.0.5
Unpacked Size
6.72 kB
Size
3.08 kB
File Count
4
NPM Version
6.4.1
Node Version
8.13.0
Cumulative downloads
Total Downloads
Last day
-77.8%
2
Compared to previous day
Last week
-10.6%
42
Compared to previous week
Last month
-48.4%
294
Compared to previous month
Last year
-7.2%
4,450
Compared to previous year
Custom React Hooks for image natural size.
Note: Make sure that you have installed the correct version of
react(>= v16.8.0)
andreact-dom(>= v16.8.0)
.
1npm install --save @use-hooks/image-size
1yarn add @use-hooks/image-size
1/** 2 * Params 3 * @param {string} url - The image url 4 */
1/** 2 * Returns 3 * @param {array} size - The image size [width, height] 4 */
1import React from 'react'; 2 3import useImageSize from '@use-hooks/image-size'; 4 5export default function App() { 6 const url = 'https://cdn.int64ago.org/ogk39i54.png'; 7 const [width, height] = useImageSize(url); 8 9 return ( 10 <div> 11 <h2>DEMO of <span style={{ color: '#F44336' }}>@use-hooks/image-size</span></h2> 12 <div> 13 <img src={url} width={100} height={100} alt="" /> 14 <div>Natural size: {width} x {height}</div> 15 </div> 16 </div> 17 ); 18} 19
Node >= v8 LTS
npm install
npm start
MIT
Generated by create-react-hooks.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/17 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 SAST tool detected
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
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-30
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