Closed
Description
Description
This RFC proposes adding the package @stdlib/array/base/count-same-value
.
The package should be structured similarly to @stdlib/array/base/count-truthy
.
The package should expose an API having the same signature as countTruthy
, with the addition of a value
argument.
function countSameValue( x, value ) {...}
Internally, the package should use @stdlib/assert/is-same-value
to test whether an element x[i]
is equal to a specified value
.
Package: @stdlib/array/base/count-same-value
Alias: countSameValue
Related Issues
Related issues #1324.
Questions
No.
Other
No.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:
.