-
-
Notifications
You must be signed in to change notification settings - Fork 804
feat: add array/base/count-if
#1372
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
feat: add array/base/count-if
#1372
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hi there! 👋
And thank you for opening your first pull request! We will review it shortly. 🏃 💨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking on this package!
We should change the function signature for the predicate function to not only receive the value and this context, but also the array index and array reference itself. See comment on the main.js
file. This will match the project convention and provide more flexibility to users.
296d2ad
to
64c19d4
Compare
@Planeshifter I have fixed the issues :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation looks great; the one thing we could improve a bit are the TypeScript definitions. Would you mind taking a look at this, please? Thanks in advance!
lib/node_modules/@stdlib/array/base/count-if/docs/types/index.d.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: Utkarsh <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: Utkarsh <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: Utkarsh <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: Utkarsh <[email protected]>
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: Utkarsh <[email protected]>
@Planeshifter done 👍 |
Co-authored-by: Philipp Burckhardt <[email protected]> Signed-off-by: Utkarsh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you! Let's get this landed! Made some minor doc changes (aiming to use the 80 character line width in repl.txt
more fully and adding spaces in the test.ts
files per our code style) and will merge once CI passes.
lib/node_modules/@stdlib/array/base/count-if/docs/types/test.ts
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/array/base/count-if/docs/types/test.ts
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/array/base/count-if/docs/types/test.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
@Ut-the-pro There were a few more small lint errors that had to be fixed such as trailing spaces; if you are using a code editor such as VSCode or Sublime Text, it's a good idea to install extensions for ESLint and editorconfig to automatically format your code on save, Also, don't forget to run the stdlib But this should be ready to land finally, thanks again! 🎉 |
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
PR-URL: stdlib-js#1372 Closes: stdlib-js#1324 Signed-off-by: Utkarsh <[email protected]> Signed-off-by: Philipp Burckhardt <[email protected]> Co-authored-by: Philipp Burckhardt <[email protected]> Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Athan Reines <[email protected]>
Resolves #1324 .
Description
This pull request adds the package
@stdlib/array/base/count-if
.Related Issues
This pull request:
@stdlib/array/base/count-if
#1324Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers