Created
September 9, 2022 01:56
-
-
Save etc-tiago/19cb304e0444a8edd952a310bc039442 to your computer and use it in GitHub Desktop.
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
const isPDF = (buf) => | |
Buffer.isBuffer(buf) && | |
buf.lastIndexOf('%PDF-') === 0 && | |
buf.lastIndexOf('%%EOF') > -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment