Sha256: 917554f22fd62b32644a61e4f46190cd886fab9b53adba30ca6cf5299815370c
Contents?: true
Size: 325 Bytes
Versions: 185
Compression:
Stored size: 325 Bytes
Contents
const notAlpha = /[^a-z]+/gi, alphaLength = 26; let cleaned, sortedSet; class Pangram { constructor(candidate) { cleaned = (candidate.replace(notAlpha, '')).toLowerCase(); sortedSet = new Set([...cleaned].sort()); } isPangram() { return sortedSet.size === alphaLength; } } export default Pangram;
Version data entries
185 entries across 185 versions & 1 rubygems