Improved API to mapArgs?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- tooling
Research direction
Start at the _.mapArgs implementation and inspect its existing uses to understand the current curried API. Compare those uses with the proposed two-argument form; done means the project has an agreed API direction and corresponding behavior, with compatibility expectations clarified.
Written by the indexing model from the issue text.
Description
I'm wondering if it would be better to have _.mapArgs not be curried. As of right now it is used like so:
squareAndDouble = _.mapArgs(doubleNum)(square);
squareAndDouble(3);
// => 18
However, I'd find the following more intuitive.
squareAndDouble = _.mapArgs(doubleNum, square);
squareAndDouble(3);
// => 18
This keeps the typical Underscore pattern of putting the "operand" value first, and the "operator" value second within one call. Is there a compelling reason to use the curried version @fogus ?
- Dominant language
- JavaScript
- Stars
- 622
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from documentcloud/underscore-contrib
-
Boolean helper Open
Difficulty 3/5 1-2 days Newbie friendliness 38/100
documentcloud/underscore-contrib#254 · 2 comments ·
-
breaking change bug
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
documentcloud/underscore-contrib#252 · 7 comments ·
-
after modules enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
after modules question
Difficulty 5/5 Over a week Newbie friendliness 25/100
documentcloud/underscore-contrib#234 · 1 comment ·
-
after modules docs enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in documentcloud/underscore-contrib
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
antfu-collective/icones#398 ·
-
ECmail.com Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
wesbos/burner-email-providers#554 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
components-web-app/docs#92 ·