@zendesk/laika
Version:
Test, mock, intercept and modify Apollo Client's operations — in both browser and unit tests!
7 lines • 397 B
JavaScript
export const getLogStyle = (input) => {
const str = typeof input === 'string' ? input : '(anonymous)';
const hash = [...str].reduce((sum, letter) => { var _a; return sum + ((_a = letter.codePointAt(0)) !== null && _a !== void 0 ? _a : 0); }, 0);
const hue = hash.toFixed(0);
return `color: hsl(${hue}, 70%, 70%); background-color: black`;
};
//# sourceMappingURL=getLogStyle.js.map