base64-regex
base64-regex copied to clipboard
File does not validate as base64
This PDF-file does not validate as a valid base64. Any idea why?
const fs = require('fs')
const base64Regex = require('base64-regex')
const b64 = fs.readFileSync('./smalltest.pdf' ,'base64')
console.log(b64) // missing == at end
console.log(base64Regex().test(b64)) // false