Node pass-through stream for MIME type detection.
This package depends on
adding its own interface on top.
file-type provides a pass-through stream right out of the box.
Hence, this package has become obsolete. It will at most receive critical
Do not use
mime-stream in new projects, and migrate old projects away.
npm i mime-stream
This event is emitted as soon as the type is detected. If the type remains
null is passed to the event handler instead of an object.
It is guaranteed that there is always exactly one
type event emitted, even
when the stream is closed prematurely.
const fs =const MimeStream =const stream =streamfs
You could also add more
.pipe() calls to the chain.
non-destructive and passes on any data it receives.
This is the same as binding a function to the
type event, just more
const fs =const MimeStream =// `new` is optional anywayfs
After detection, the detection result is also available inside the