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

feat(frontend): use utility isEmptyString #4061

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Conversation

peterpeterparker
Copy link
Member

Motivation

There is a new utility isEmptyString in @dfinity/utils which can be use instead of !notEmptyString. So this PR replace the one occurence of such code we have in our code base.

Changes

  • Replace function usage

Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

We have isNullishOrEmpty util too, can it be replaced with this one?

@peterpeterparker
Copy link
Member Author

We have isNullishOrEmpty util too, can it be replaced with this one?

Maybe but, we need to clean thing?

ic-js:

  • notEmptyString -> boolean
  • isEmptyString -> boolean

oisy:

  • isNullishOrEmpty -> value is undefined | null

@peterpeterparker peterpeterparker merged commit f54da33 into main Dec 23, 2024
21 checks passed
@peterpeterparker peterpeterparker deleted the feat/isEmptyString branch December 23, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants