Merge pull request #2613 from SinZ163/patch-1

Add reminder that ascii is awesome
This commit is contained in:
Pavel Djundik 2018-07-03 21:58:25 +03:00 committed by GitHub
commit 4eb599e786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,5 +8,10 @@ module.exports = function(str) {
hash += str.charCodeAt(i);
}
/*
Modulo 32 lets us be case insensitive for ascii
due to A being ascii 65 (100 0001)
while a being ascii 97 (110 0001)
*/
return "color-" + (1 + hash % 32);
};