gajus / table

Formats data into a string table.
Other
893 stars 77 forks source link

fix: allow readonly array input for table data #218

Open bmish opened 1 year ago

bmish commented 1 year ago

This is the minimum set of changes needed to allow a readonly array to be passed as input to the public table() function, in addition to regular arrays (backward compatible).

Some users may prefer to declare their arrays as readonly, or use functions/libraries that return readonly arrays when generating the table data. This change improves compatibility for such users.

It's also generally good practice for us to enforce that we do not modify input parameters.

Potential follow-up changes:

References:

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4461649881


Totals Coverage Status
Change from base Build 3374277795: 0.0%
Covered Lines: 642
Relevant Lines: 642

💛 - Coveralls
nam-hle commented 1 year ago

Hi @bmish, thanks for contributing!

So this change is a kind of breaking change, isn't it?

bmish commented 1 year ago

Nope, not a breaking change. It allows read-only arrays but does not require them. It expands the allowed input.

bmish commented 1 year ago

Ping? Again, this is not a breaking change.

bmish commented 8 months ago

Ping?