Skip to content

Instantly share code, notes, and snippets.

View k0d3d's full-sized avatar
🎯
Focusing

Rhema k0d3d

🎯
Focusing
View GitHub Profile
import axios from 'axios';
import { fromBuffer } from 'file-type';
import { equals, includes, isEmpty, isNil, last, split } from 'ramda';
/**
* Checks is the payload image and if it is will also check do we need to process it, the searchParams are not empty. Internally this method will fetch the minimum amount of bytes (4100) using the Range header and try to determine the mime type.
*
* Example:
*
* ```ts
* // this will return false because it doesn't have the searchParams