1.0.0 • Published 1 year ago

whobuffer v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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;

1.0.0

1 year ago