Skip to content

isBase64 padding support #2501

@antonio-ivanovski

Description

@antonio-ivanovski

Describe the bug

Sometimes when base64 strings has the padding removed for either legacy or bandwidth purposes. In those cases, the padding check needs to be ignored or manually the padding to be added.

Either this should be the default behavior or config option should be added.

Examples

// const base64 = Buffer.from([1,2,3,4]).toString('base64');
const base64 = 'AQIDBA';
const result = isBase64(base64); // false, should be true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions