sindresorhus

image-type

Detect the image type of a Buffer/Uint8Array

by sindresorhus

JavaScript

JavaScript64.7%
TypeScript35.3%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
BendingBender

The module docs and the TS types both document that the module returns an when no file type could be determined. But the actual implementation calls which necessarily returns a . Not sure which one is the intended return value, but at least it's incorrectly documented right now.

BendingBender · 1y ago
bjornstar

See - https://sindresorhus.com/blog/goodbye-nodejs-buffer If you'd prefer to only accept Uint8Array, I can update. I made it match what accepts.

bjornstar · 2y ago
Structured data for AI agents

Repository: sindresorhus/image-type. Description: Detect the image type of a Buffer/Uint8Array Stars: 425, Forks: 16. Primary language: JavaScript. Languages: JavaScript (64.7%), TypeScript (35.3%). License: MIT. Latest release: v6.1.0 (7mo ago). Open PRs: 0, open issues: 0. Last activity: 3mo ago. Community health: 85%. Top contributors: sindresorhus, bjornstar, BendingBender, kevva, pgilad, jasonharrison, Richienb.