How sindresorhus/is-png works
is-png is a small runtime utility that checks the first eight bytes of a Buffer or Uint8Array against the PNG signature and returns a boolean. Node.js and browser callers supply the bytes; the TypeScript declaration documents the API. The workflow is supported by the README and implementation; no other runtime subsystems are present.
Main entry points: index.js PNG detector
Components 4
Other components
- Caller
- PNG detector
index.js - Boolean result
- Type contract
index.d.ts
Connections 2
- Caller → PNG detector: passes bytes
readme.md - PNG detector → Boolean result: returns match
index.js