Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support of strings as lists #36

Closed
3 tasks
customcommander opened this issue Jan 3, 2022 · 1 comment
Closed
3 tasks

Remove support of strings as lists #36

customcommander opened this issue Jan 3, 2022 · 1 comment
Labels
Milestone

Comments

@customcommander
Copy link
Owner

The idea was to treat strings like lists so one could do:

const double = map(x => x + x);

double([1,2,3]);
//=> [2,4,6]

double('abc');
//=> 'aabbcc'

This is fine for plain old ascii strings but things can get complicated very quickly when dealing with multi-codepoint characters:

"🌯🍣🌮".split("")[0];
//=> "�"

If people need to treat strings as lists they would be better off operating that conversion with libraries such as Runes

Tasks

  • into should still support string as a destination
  • Remove strings support from list-based functions
  • Update documentation
@customcommander customcommander added this to the v4.0.0 milestone Jan 3, 2022
customcommander added a commit that referenced this issue Jan 28, 2022
BREAKING CHANGE: the following functions no longer accept strings as lists: `all`, `any`, `drop`, `filter`, `into`, `map`, `none` and `take`.
customcommander added a commit that referenced this issue Jan 28, 2022
BREAKING CHANGE: the following functions no longer accept strings as lists: `all`, `any`, `drop`, `filter`, `into`, `map`, `none` and `take`.
github-actions bot pushed a commit that referenced this issue Jan 28, 2022
# [4.0.0](v3.3.0...v4.0.0) (2022-01-28)

### chore

* refactor `fallback` as an operator function. close [#38](#38) ([38c1bb0](38c1bb0))
* remove `concede`. close [#35](#35) ([30c75aa](30c75aa))
* remove support of strings as lists. close [#36](#36) ([1ae4b26](1ae4b26))

### BREAKING CHANGES

* the following functions no longer accept strings as lists: `all`, `any`, `drop`, `filter`, `into`, `map`, `none` and `take`.
* `fallback` is now an operator function.
* the `concede` function is no longer available
@customcommander
Copy link
Owner Author

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant