ramda / ramda

:ram: Practical functional Javascript
https://ramdajs.com
MIT License
23.83k stars 1.44k forks source link

The return comment and document description of the count function is incorrect #3495

Open N0FreeLunch opened 3 hours ago

N0FreeLunch commented 3 hours ago

https://github.com/ramda/ramda/blob/173ceba9ab89a28428b4794594dc436b993a932b/source/count.js#L14

Current

@return {Array} list of items to count in

Proposal

@return {Number} the count of items matching the predicate

Document

Current

|--------------------------------------
| predicate
| to match items against.
|--------------------------------------
| Returns Array list of items to count in
|--------------------------------------

Proposal

|-----------------------------------------------------------------
| f
| The predicate function to match items against.
|-----------------------------------------------------------------
| list  
| The list to count elements from.
|-----------------------------------------------------------------
| Returns Number The count of items matching the predicate.
|-----------------------------------------------------------------
kedashoe commented 2 hours ago

:+1: would you like to submit a PR with the fix, @N0FreeLunch ?