Add reminder that ascii is awesome.

This commit is contained in:
Trent Monahan 2018-07-03 19:51:10 +10:00
parent dc6ca963f5
commit 3a89935c29

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);
};