This commit is contained in:
2022-11-04 15:54:53 +01:00
parent 6ec5cf99ca
commit d9c3eafba1
13 changed files with 16287 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
export const isPangram = (text: string): boolean =>
text
.toLowerCase()
.split("")
.sort()
.map((v) => v.charCodeAt(0))
.filter((v) => v >= 97 && v <= 97 + 25)
.reduce((r, v) => (r[r.length - 1] === v ? r : [...r, v]), [] as number[])
.length === 26;