Repository navigation
Add count command to show how many notes exist - #306
Open
hernandezggg wants to merge 1 commit into
Open
hernandezggg wants to merge 1 commit into
hernandezggg wants to merge 1 commit into
Conversation
Adds store.count() and a `count` CLI command that prints "You have N notes." (singular for one note), and documents it in the README command list. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mateacademy-ai-mentor
approved these changes
Oct 27, 2026
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation correctly adds the count command as required. Both lib/store.js and notes.js have been updated with the new functionality, including proper singular/plural handling ("You have 1 note." vs "You have X notes."). All five required commands (add, list, search, delete, count) are implemented and the help text is updated. The code follows existing patterns in the codebase and integrates seamlessly. The PR was properly created from a new branch with an appropriate description. Your solution meets all task requirements and is ready to merge.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
hernandezggg
force-pushed
the
add-count-command
branch
from
October 27, 2026 08:30
f18475c to
84ec000
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
store.count()inlib/store.js, which returns the number of saved notes.countcommand tonotes.jsthat printsYou have N notes.(You have 1 note.for a single note).countto the usage line shown for unknown commands and to the command list inREADME.md.Why
There was no quick way to see how many notes you have without running
listand counting the lines by hand.countgives that answer in one command.How it was tested
npm testpasses (3/3) before and after the change.node notes.js countmanually with 0, 1 and 2 notes and checked the output for each case.🤖 Generated with Claude Code