more refactor

This commit is contained in:
Andras Schmelczer 2019-09-06 23:16:05 +02:00
commit d612678682

View file

@ -4,8 +4,7 @@ export const hash = (text: string): number => {
return 0;
}
const hashValue = Array.prototype.reduce.call(
// tslint:disable-next-line:no-bitwise
text,
text, // tslint:disable-next-line:no-bitwise
(value, char) => ((value << 5) - value + (char.charCodeAt(0) as number)) | 0,
7
);