Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Improved API to mapArgs?

Open
#124 0 comments 1 reaction 0 assignees View on GitHub

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

after modules question

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from documentcloud/underscore-contrib

All issues in documentcloud/underscore-contrib

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.