file-type icon indicating copy to clipboard operation
file-type copied to clipboard

Detect the file type of a Buffer/Uint8Array/ArrayBuffer

Results 37 file-type issues
Sort by recently updated
recently updated
newest added
trafficstars

In SvelteKit, the `event.request.body` is a web-interoperable stream. However, when this package is imported in a SvelteKit project running in Bun, it tries to load the NodeJS stuff. I recommend...

### Steps to reproduce See #613. ### Expected result The file is correctly detected as `xlsx`. ### Actual result The file is incorrectly detected as `cfb`.

As for now - sets of supported mimetypes and extensions exposed, but not relation between them. I think it will be useful to expose maps that will expose relation between...

See: https://github.com/sindresorhus/file-type/pull/588#issuecomment-1493880124

enhancement
help wanted

See: https://github.com/sindresorhus/file-type/pull/588#issuecomment-1493880124

enhancement

When pdf files have images created from photoshop or adobe ai in them, `file-type` detects them as .ai based on the byte checking heuristic we have in place. I'm proposing...

It's time to say [Goodbye, node.js Buffer](https://sindresorhus.com/blog/goodbye-nodejs-buffer) in this library. Resolves #578 TODO: - [ ] [Update `token-types` to take encoding for `StringType`](https://github.com/Borewit/token-types/pull/650) - [x] [Add `indexOf` & `getUintBE` to...

Resolves: https://github.com/sindresorhus/file-type/issues/657 Docs/magic numbers: https://www.w3.org/TR/webvtt1/#iana-text-vtt

Just out of curiosity, as there are so many issues with legacy CommonJS projects, trying to import this pure ESM module. Would this solution help a bit? I added 2...