Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Viktoryia Kliushun <[email protected]>
  • Loading branch information
blazejkustra and VickyStash authored Jun 5, 2024
1 parent fe78305 commit 87021cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/str.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ const Str = {
/**
* Returns true if the haystack begins with the needle
*
* @param haystack The full string to be searched
* @param needle The case-sensitive string to search for
* @returns Retruns true if the haystack starts with the needle.
* @param haystack The full string to be searched
* @param needle The case-sensitive string to search for
* @returns True if the haystack starts with the needle.
*/
startsWith(haystack: string, needle: string): boolean {
return this.isString(haystack) && this.isString(needle) && haystack.substring(0, needle.length) === needle;
Expand Down Expand Up @@ -360,7 +360,7 @@ const Str = {
*
* @param str The string to check for domainnameness.
*
* @returns True iff the string is a domain name
* @returns True if the string is a domain name
*/
isValidDomainName(str: string): boolean {
return Boolean(String(str).match(Constants.CONST.REG_EXP.DOMAIN));
Expand All @@ -381,7 +381,7 @@ const Str = {
*
* @param str The string to check for email validity.
*
* @returns True iff the string is an email
* @returns True if the string is an email
*/
isValidEmail(str: string): boolean {
return Boolean(String(str).match(Constants.CONST.REG_EXP.EMAIL));
Expand Down

0 comments on commit 87021cc

Please sign in to comment.