mattdesl / mattdesl/module-best-practices
Best practices for an API
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
There seems to be disagreement in the community as to where data should land.
- Some say data should come last. Not without reason.
- There’s a new function bind proposal which can result in very elegant code. There seems to be a lot of excitement about that.
- At the moment we have many traditional libraries and ponyfills which take data as the first parameter.
These different types of APIs often result in ugly code when mixed together.
Should a library provide three different APIs for different styles then? Go for the most popular (3)? Most flexible (1)? Most hip (2)?
I don’t know if such tips are in the scope of this repo. But I hope for some discussion – because I feel lost :)
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reading the issue discussion and the linked examples of data-last, function-bind, and data-first APIs. Determine whether this repository intends to document guidance on API argument order; done would require a clear maintainer decision and corresponding best-practices documentation, but the issue does not name a file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100