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
Being able to truncate text, which is quite useful in for instance @effect/cli apps. I'm using it to make sure that the multiSelect doesn't overflow and cause glitches when rendering.
What is the feature you are proposing to solve the problem?
I currently have a utility function for this. But I kind of expected String module to contain it. I feel like if Effect wants to be JavaScript's standard library, then it's a useful function to have.
The text was updated successfully, but these errors were encountered:
(The truncate should also optionally add … at the end)
And I understand it's a short function to define yourself, but the point of a standard library is to provide utility functions so we don't have to write these function ourselves.
I see no downside in including such functions, that can be treeshaken away if not used.
What is the problem this feature would solve?
Being able to truncate text, which is quite useful in for instance
@effect/cli
apps. I'm using it to make sure that themultiSelect
doesn't overflow and cause glitches when rendering.What is the feature you are proposing to solve the problem?
String.truncate(text: string, maxLength: number) => string
What alternatives have you considered?
I currently have a utility function for this. But I kind of expected
String
module to contain it. I feel like if Effect wants to be JavaScript's standard library, then it's a useful function to have.The text was updated successfully, but these errors were encountered: