Gathering detailed insights and metrics for @jcayzac/image-information
Gathering detailed insights and metrics for @jcayzac/image-information
Gathering detailed insights and metrics for @jcayzac/image-information
Gathering detailed insights and metrics for @jcayzac/image-information
npm install @jcayzac/image-information
Typescript
Module System
Node Version
NPM Version
68.1
Supply Chain
97.8
Quality
77.6
Maintenance
100
Vulnerability
100
License
@jcayzac/astro-image-service-ng@0.4.2-dev.0
Published on 01 Jan 2025
@jcayzac/atom-feeds@0.0.3-dev.0
Published on 31 Dec 2024
@copepod/kv@0.0.2
Published on 08 Oct 2024
@jcayzac/astro-image-service-ng@0.4.1
Published on 08 Oct 2024
@jcayzac/astro-image-service-ng@0.4.1-dev.0
Published on 08 Oct 2024
@copepod/kv@0.0.2-dev.0
Published on 08 Oct 2024
TypeScript (90.24%)
CSS (8.99%)
JavaScript (0.65%)
Shell (0.12%)
Total Downloads
584
Last Day
5
Last Week
7
Last Month
43
Last Year
584
5 Stars
259 Commits
2 Forks
1 Watching
6 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.1.1
Package Id
@jcayzac/image-information@1.1.1
Unpacked Size
17.02 kB
Size
5.91 kB
File Count
7
NPM Version
10.8.2
Node Version
20.17.0
Publised On
03 Sept 2024
Cumulative downloads
Total Downloads
Last day
66.7%
5
Compared to previous day
Last week
-56.3%
7
Compared to previous week
Last month
72%
43
Compared to previous month
Last year
0%
584
Compared to previous year
1
@jcayzac/image-information
Lightweight detection of local or remote images' type, orientation & size in pure Javascript.
This module detect informations about local or remote images. For remote images, it streams the data only until it finds information.
Images in the following formats are supported: GIF, HEIC, HEIF, AVIF, J2C, JP2, JPEG, PNG, SVG & WebP.
1# pnpm 2pnpm add @jcayzac/image-information 3 4# bun 5bunx add @jcayzac/image-information 6 7# npm 8npx add @jcayzac/image-information 9 10# yarn 11yarn add @jcayzac/image-information 12 13# deno 14deno add npm:@jcayzac/image-information
1import { imageInformation } from '@jcayzac/image-information' 2 3// Remote URL 4const info = await imageInformation('https://example.com/image.jpg') 5if (info !== undefined) { 6 const { 7 // intrinsic width. 8 width, 9 10 // intrinsic height. 11 height, 12 13 // inferred file extension (doesn't care about URL). 14 extension, 15 16 // inferred MIME type. 17 type, 18 19 // detected EXIF orientation, if any. 20 orientation, 21 } = info 22 23 console.log(`Found information:`, info) 24} 25 26// File URL 27const info2 = await imageInformation('file:///tmp/image.jpg')
[!NOTE]
The function accepts strings as a convenience, but those are expected to represent valid URLs. For local images, you must use the
file://
URL scheme. Passing paths directly will not work.
The probe()
function can be used to get information about an image from a buffer (either an Uint8Array
or a node Buffer
).
1import { readFile } from 'node:fs/promises' 2import { probe } from '@jcayzac/image-information' 3 4const buffer = await readFile('image.jpg') 5const info = await probe(buffer)
If you like anything here, consider buying me a coffee using one of the following platforms:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
10 out of 10 merged PRs checked by a CI test -- score normalized to 10
Reason
3 different organizations found -- score normalized to 10
Details
Reason
no dangerous workflow patterns detected
Reason
update tool detected
Details
Reason
license file detected
Details
Reason
30 commit(s) out of 30 and 0 issue activity out of 2 found in the last 90 days -- score normalized to 10
Reason
SAST tool is run on all commits
Details
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 1
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
found 7 unreviewed changesets out of 7 -- score normalized to 0
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-01-03T18:48:53Z
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