more refactor
This commit is contained in:
parent
9933f4f9ff
commit
d612678682
1 changed files with 36 additions and 52 deletions
|
|
@ -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
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue