How sindresorhus/is-jpg works
is-jpg is a tiny JPEG-signature checker. A caller supplies a Buffer or Uint8Array; the exported function rejects inputs shorter than three bytes and otherwise checks the first three bytes for the JPEG signature, returning a boolean. The graph covers only this runtime behavior; it does not include tests or development tooling.
Main entry points: index.js JPEG checker
Components 3
Other components
- Caller
- JPEG checker
index.js - Boolean result
Connections 2
- Caller → JPEG checker: supplies bytes
readme.md - JPEG checker → Boolean result: returns result
index.js