You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the module has a bias towards LF, e.g. when a string contains a equal amount of LF and CRLF, it will return LF. The module's description says it returns the "dominant" variant, but when they are equal, none dominate and I think it would be more correct to return undefined.
The text was updated successfully, but these errors were encountered:
silverwind
changed the title
Return undefined when equal counts?
Return undefined on equal counts?
Sep 19, 2023
While you are techincally correct, I think the current behavior is more pragmatic. It would also be too much of a breaking change to change it at this point. It would be better to update the docs to reflect the behavior.
I noticed the module has a bias towards LF, e.g. when a string contains a equal amount of LF and CRLF, it will return LF. The module's description says it returns the "dominant" variant, but when they are equal, none dominate and I think it would be more correct to return
undefined
.The text was updated successfully, but these errors were encountered: