Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS
► hash(str: string
): string
Defined in hash.ts:41
Generates a unique hash (DJB2) string from a string
hash('Hash this string'); // -> sg463l
Parameters:
Param | Type | Description |
---|---|---|
str | string |
String to generate hash string from |
Returns: string
► hashCode(str: string
): number
Defined in hash.ts:15
Generates a unique numeric hash (DJB2) code from a string
hashCode('Hash this string'); // -> 1720121313
Parameters:
Param | Type | Description |
---|---|---|
str | string |
String to generate hash code from |
Returns: number