Skip to content

[RFC]: add @stdlib/array/base/count-same-value #1325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
kgryte opened this issue Feb 21, 2024 · 0 comments · Fixed by #1339
Closed
3 tasks done

[RFC]: add @stdlib/array/base/count-same-value #1325

kgryte opened this issue Feb 21, 2024 · 0 comments · Fixed by #1339
Labels
Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! RFC Request for comments. Feature requests and proposed changes.

Comments

@kgryte
Copy link
Member

kgryte commented Feb 21, 2024

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:.
@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! labels Feb 21, 2024
kgryte added a commit that referenced this issue Feb 22, 2024
Closes: #1325
PR-URL: 	#1339
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! RFC Request for comments. Feature requests and proposed changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant