This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |