kachick / ruby-ulid

generator, parser, optional monotonicity and manipulations for ULID
https://kachick.github.io/ruby-ulid/
MIT License
35 stars 2 forks source link

Provide special parser for original `Crockford's base32` possibility #78

Closed kachick closed 2 years ago

kachick commented 3 years ago

ref: https://github.com/kachick/ruby-ulid/issues/57 and https://github.com/ulid/spec/pull/57

My suggestion around the issue is written in https://github.com/oklog/ulid/issues/69#issuecomment-831447869 and https://github.com/ulid/spec/pull/57/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R31

All characters except 0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz are invalid in ULID

I think ignoring them is the desirable spec for actual use-case, rather than strict following original Crockford's base32.

But providing the parser for covering the original Crockford's base32 might be useful for exists difficult ULIDs.

How

kachick commented 3 years ago

When provide to it, the parser should have another name with current one, I feel 🤔

Or adding keyword arguments as an optional parameter? 🤔

kachick commented 3 years ago

Just providing new parser is not a hard task. Considering to update or keep exists methods is annoy 🤔