Skip to content

Invalid Base62 string parses and validates #29

@idleberg

Description

@idleberg

I was surprised that the following example doesn't return false. Actually, I'd expected the parser to throw an error first.

const invalidBase62 = '@@@@@@@@@@@@@@@@@@@@@@@@@@@';
const parsedKsuid = KSUID.parse(invalidBase62);

KSUID.isValid(parseKSUID.raw); // true

Is this my misconception about the library, or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions