-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add a module to find the title #548
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
Conversation
browser/lib/findNoteTitle.js
Outdated
| @@ -0,0 +1,32 @@ | |||
| export function find (value) { | |||
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.
[Question] Why didn't you name this method like findNoteTitle?
I think find is a little ambiguous.
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.
Because I don't like
repetition like findNoteTitle.findNoteTitle(). What do you think noteUtils.findNoteTitle()?
The reason why I didn't choose that name is because I add only 1 method this time. I thought don't need to change the name to noteUtils unless need to add a lotta methods.
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.
Is the way like below is better for you?
export function findNoteTitle() {
//
}
export default {
findNoteTitle,
}import { findNoteTitle } from 'browser/lib/findNoteTitle'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.
Oh, yes! It's the better way 😄
sota1235
left a comment
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.
Please confirm the comment.
|
@sota1235 I fixed the name 🙏 |
…d inside the file
I added a module to find a title of a note.