Skip to content
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

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

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

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

kgryte opened this issue Feb 21, 2024 · 4 comments · Fixed by #1384
Assignees
Labels
Accepted RFC feature request which has been accepted. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! JavaScript Issue involves or relates to JavaScript. priority: Low Low priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. Utilities Issue or pull request concerning general utilities.

Comments

@kgryte
Copy link
Member

kgryte commented Feb 21, 2024

Description

This RFC proposes adding the package @stdlib/array/base/count-same-value-zero.

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 countSameValueZero( x, value ) {...}

Internally, the package should use @stdlib/assert/is-same-value-zero to test whether an element x[i] is equal to a specified value.

Package: @stdlib/array/base/count-same-value-zero
Alias: countSameValueZero

Related Issues

Related issues #1324, #1325.

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
@TheNourhan

This comment was marked as outdated.

@kgryte

This comment was marked as outdated.

@kgryte kgryte added priority: Low Low priority concern or feature request. Utilities Issue or pull request concerning general utilities. Accepted RFC feature request which has been accepted. JavaScript Issue involves or relates to JavaScript. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. labels Feb 23, 2024
@AgPriyanshu18
Copy link
Contributor

@kgryte I have understood this issue and would like to work on it.Please assign this to me.

@kgryte
Copy link
Member Author

kgryte commented Feb 23, 2024

Thanks for volunteering to work on this @AgPriyanshu18. Please feel free to submit a PR implementing this feature.

AgPriyanshu18 added a commit to AgPriyanshu18/stdlib that referenced this issue Feb 25, 2024
count the number of elements that are equal to a given value in an array

Fixes stdlib-js#1326
Planeshifter added a commit that referenced this issue Feb 28, 2024
PR-URL: #1384
Closes: #1326

Co-authored-by: Jaysukh Makvana <111515433+Jaysukh-409@users.noreply.github.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com>
Signed-off-by: AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com>
Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Reviewed-by: Jaysukh Makvana <111515433+Jaysukh-409@users.noreply.github.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted RFC feature request which has been accepted. difficulty: 2 May require some initial design or R&D, but should be straightforward to resolve and/or implement. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! JavaScript Issue involves or relates to JavaScript. priority: Low Low priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. Utilities Issue or pull request concerning general utilities.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants