stevegeek / encoded_id

Turn numeric or hex IDs into reversible and human friendly obfuscated strings
MIT License
8 stars 2 forks source link

Add an optional max_length argument #6

Closed jugglebird closed 1 year ago

jugglebird commented 1 year ago

The max_length allows for limits on the encoded id and will be defaulted to 128 characters.

In addition to the changes needed to support max_length in encoding and decoding, I had to add max_length: nil to a few of the tests in order to not get caught by the default max_length.

stevegeek commented 1 year ago

Thanks so much for the contribution! I will look at this as soon as I can.

stevegeek commented 1 year ago

@jugglebird Thanks very much!