-
Notifications
You must be signed in to change notification settings - Fork 89
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
Suggestions #147
Comments
Deprecate |
Introduce |
|
Could forEach be enhanced to work on Objects as well as Arrays as map and filter do to match Ramda's forEachObjIndexed which Rambda has not counterpart? |
This is nice suggestions. I will post spec once the new behavior is written, so you can confirm it. |
@kuchta I will have to ask for collaboration as if you look at the source of |
Expose |
@StreetStrider |
@selfrefactor for me, actual name here is a matter of clarity. Names, like es is better than src, but src is OK too. |
I thank you @StreetStrider for the clarification. The latest version |
@selfrefactor I've tried |
I can confirm the same bug. It seems that you will have to use |
I've tried install deps one-by-one, error occurs here:
So it is most likely a bug in transient dep of selfrefactor/minify. |
@StreetStrider I simply removed |
@selfrefactor good to know. Environment must be reproducible for others. |
Implement lenses functions. |
@romgrk this has been brought up before and I will welcome any PR that addresses lenses integration, but I am not using them and it will be a bit hard for me to write the logic. |
Sure, I understand. Brian Lonsdorf has a pretty straight-forward implementation of lenses here, I wonder if we could just re-use that one. |
Thanks for the link @romgrk , but I guess you will have to use |
Other suggestion, I notice that the signature for some methods is sometimes not exactly the same as ramda. Is it possible to make it 100% compatible? (e.g. |
Sure, JSDoc annotations is a recent PR which was pretty big and as you noticed there are obvious inconsistencies. Your PR fixing these issues is very welcome. |
Ok, is it fine if I modify rambda's API to match ramda one, rather than modify the jsdocs? |
You will have to check the entry in the intro of |
They're made on purpose? It would be more convenient for users to have the same API. |
It is almost the same. I try to extend rather than change existing behavior. I am fine with modification as long as they are not related to the known differences. |
@romgrk Your changes are live with the new version. Thanks for the input and I will keep you updated when there is progress with lenses. |
It would be great to have typings directly in the source code (making the source code effectively TypeScript) to prevent it to get out of sync with the code. |
@kuchta I am unsure what you mean. Do you mean something like |
@selfrefactor I meant to put typings directly into sourcecode and rename it from js to ts :) |
@selfrefactor I looked through your code, and everywhere you use «manual» currying, without explicitly depending on foo(A, B) => R
foo(A) => foo(B) => R TS overloads. |
@StreetStrider I tried this approach before, but I wasn't happy with the output for |
@kuchta My recent work experience changed the way read any code and now I try to be as simple as possible. This means that I am not very eager to understand and implement lenses, but as I had said before, this doesn't mean that I will reject any PR that addresses this feature request. |
I'm evaluating rambda as an alternative over ramda for the cases where it doesnt type wel lfor the |
Still wating for this Typescript issue to be addressed. Until then, there is not much that it could be done in this regard. Personaly me, I stopped using One crazy solution is to have two methods for curried and uncurried version, i.e. |
Ramda methods I miss in Rambda:
|
As stated before, lenses are hard for me to implement, so unless somebody opens a PR, they will be lacking in Rambda. As for the other 5 suggestions - I will implent them with the version after the next one as now I am in the middle of writing typings tests. Thank you for your suggestions @squidfunk |
I went ahead and implemented the set functions in four separate PRs. They can be generalized to the |
Great job @squidfunk |
That's great news! I also realized that I can simplify a situation where I used |
There was an error merging the typings - missing Lines 351 to 355 in 33ed7fc
|
I think the last warning is fixed as tests are passing(including the typing tests) |
@selfrefactor I fixed it in my PR ;-) |
Any way we can add |
Can we make indexBy('id', [{ id: 1 }, { id: 2 }, { id: 3 }]) |
For the aliases - my issue is that they shouln't be a first class methods and this brings many other problems. For example, how I update all the aliases when a Typescript definition change? Should I leave them out of Ramda definition file? I will keep your suggestion alive, but for the moment I have to decline it. Still, it is very possible that this change in the future. I will inform you if that happens. As for |
indexBy(obj => obj.id, [{ id: 1 }, { id: 2 }, { id: 3 }])
// same as
indexBy('id', [{ id: 1 }, { id: 2 }, { id: 3 }]) this could be dont using indexBy(obj => obj.a.b.c.id, [{ a: { b: { c: { id: 1 } } } }, { a: { b: { c: { id: 2 } } } }, { a: { b: { c: { id: 3 } } } }])
// same as
indexBy('a.b.c.id', [{ a: { b: { c: { id: 1 } } } }, { a: { b: { c: { id: 2 } } } }, { a: { b: { c: { id: 3 } } } }]) |
Ok, that helped. |
Great ^^ if you need help with that I can make a small PR for that stuff |
I am almost there so I guess there is no need for PR. I just have one more task before releasing |
maybe this can be "ramda/fp" like "lodash/fp" ? searching for "rambda js" after reading blog-post gives me results for "ramda js" 😞 |
Ramda is already fb, the main difference between rambda and ramda is tree shaking support out of the box and better performance. |
@gotenxds as for your previous comment - please post solution. In other words - you can edit directly Rambda's |
I would like to see |
@jcdietrich Will do
|
Any chance |
|
@please-rewrite @tjklemz Sure, no problem. I created issue for that - #408 but it will take at least two weeks until it is implemented, as right now I make big changes in terms of supporting scripts(build documentation, build Rambdax, generate typings, sync with Ramda test, increase The feature should be implemented with |
This issue is opened to encourage suggestions and feedback.
Vote for bringing even more Ramda methods in
Rambda
The text was updated successfully, but these errors were encountered: