UNPKG

@atlaskit/tokens

Version:

Design tokens are the single source of truth to name and store design decisions.

9 lines 262 B
export const hash = str => { let hash = 0; for (let i = 0; i < str.length; i++) { const char = str.charCodeAt(i); hash = (hash << 5) - hash + char; hash &= hash; // Convert to 32bit integer } return new Uint32Array([hash])[0].toString(36); };