UNPKG

@zendesk/laika

Version:

Test, mock, intercept and modify Apollo Client's operations — in both browser and unit tests!

11 lines 532 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getLogStyle = void 0; 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`; }; exports.getLogStyle = getLogStyle; //# sourceMappingURL=getLogStyle.js.map