(str: string)
| 44 | } |
| 45 | |
| 46 | function createShortHash(str: string): string { |
| 47 | let hash = 0; |
| 48 | for (let i = 0; i < str.length; i++) { |
| 49 | const char = str.charCodeAt(i); |
| 50 | hash = (hash << 5) - hash + char; |
| 51 | hash &= hash; |
| 52 | } |
| 53 | |
| 54 | return (hash >>> 0).toString(16).slice(-8).padStart(8, '0'); |
| 55 | } |
| 56 | |
| 57 | export function chibiList(pages: { [key: string]: PageInterface }): PageListJsonInterface { |
| 58 | const definitions: PageListJsonInterface = { |