Skip to content

Commit 4c7fdbe

Browse files
committed
style: format with standardJs
1 parent 48a8a0d commit 4c7fdbe

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

String/CheckPangram.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* What is Pangram?
2+
* What is Pangram?
33
* Ans: Pangram is a sentence that contains all the letters in the alphabet https://en.wikipedia.org/wiki/Pangram
44
*/
55

@@ -21,18 +21,17 @@ const checkPangramRegex = (string) => {
2121
* Capturing group - () -> Groups multiple tokens together and creates a capture group for extracting a substring or using a backreference.
2222
* Character set - [a-z] -> Matches a char in the range a to z in case-insensitive for the 'i' flag
2323
* Negative lookahead - (?!) -> Specifies a group that can not match after the main expression (if it matches, the result is discarded).
24-
* Dot - . -> Matches any character except linebreaks. Equivalent to
24+
* Dot - . -> Matches any character except linebreaks. Equivalent to
2525
* Star - * -> Matches 0 or more of the preceding token.
2626
* Numeric reference - \{$n} -> Matches the results of a capture group. E.g. - \1 matches the results of the first capture group & \3 matches the third.
2727
*/
2828
return string.match(/([a-z])(?!.*\1)/gi).length === 26
2929
}
3030

31-
3231
/**
3332
* @function checkPangramSet
3433
* @description - This function detect the pangram sentence by HashSet
35-
* @param {string} string
34+
* @param {string} string
3635
* @returns {boolean}
3736
*/
3837
const checkPangramSet = (string) => {
@@ -52,4 +51,4 @@ const checkPangramSet = (string) => {
5251
return lettersSet.size === 26
5352
}
5453

55-
export { checkPangramRegex, checkPangramSet}
54+
export { checkPangramRegex, checkPangramSet }

String/test/CheckPangram.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ describe('Testing checkPangramSet function', () => {
6262
checkPangramSet(undefined)
6363
}).toThrow('The given value is not a string')
6464
})
65-
})
65+
})

0 commit comments

Comments
 (0)