rallly/utils/string-to-value.ts
2022-04-12 07:14:28 +01:00

7 lines
166 B
TypeScript

export const stringToValue = (seed: string): number => {
let num = 0;
for (let i = 0; i < seed.length; i++) {
num += seed.charCodeAt(i);
}
return num;
};