whobuffer
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

This library is used to determine the image extension by buffer body.

import getFileType from 'whobuffer';

// const buffer = web request;
// const buffer = fs.readFileSync
const fileType = getFileType(buffer);

Supported Types

  • bmp
  • gif
  • jpg,jpeg
  • png
  • tiff
  • webp

Unkown types are returned by default with null;

Package Sidebar

Install

npm i whobuffer

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

7.28 kB

Total Files

15

Last publish

Collaborators

  • neaguio