-
-
Notifications
You must be signed in to change notification settings - Fork 860
Closed
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.UtilitiesIssue or pull request concerning general utilities.Issue or pull request concerning general utilities.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: LowLow priority concern or feature request.Low priority concern or feature request.
Description
Description
This RFC proposes adding the package @stdlib/array/base/count-if
.
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 predicate
and thisArg
arguments.
function countIf( x, predicate[, thisArg] ) {...}
The predicate
function should return a boolean value. If true, the function should increment a count; otherwise, the value is ignored.
Package: @stdlib/array/base/count-if
Alias: countIf
Related Issues
None.
Questions
No.
Other
This package should expose an API similar to the Excel/GSheets function of the same name: https://support.google.com/docs/answer/3093480?sjid=2342692862647625777-NC.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:
.
Metadata
Metadata
Assignees
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.UtilitiesIssue or pull request concerning general utilities.Issue or pull request concerning general utilities.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: LowLow priority concern or feature request.Low priority concern or feature request.