export const hash32 = (str: string) => {
let hash = 0;
let i;
let chr;
if (!str.length) return hash;
for (i = 0; i < str.length; i++) {
chr = str.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0;
}
return hash;
};
export const hash64 = (str: string) => {
const h1 = hash32(str);
return h1 + hash32(h1 + str);
};
catalog[3].item {id: 232,
level: "Adults 1 (Lite) / Adults 1 before MT (Smart) / Adults 1 before MT (Pro)",
skill_lite: 510,
skill_pro: 478,
skill_smart: 419}
catalog[3].id 232
catalog[3].level Adults 1 (Lite) / Adults 1 before MT (Smart) / Adults 1 before MT (Pro)
catalog[3].level === data true
catalog[3].level Adults 1 (Lite) / Adults 1 before MT (Smart) / Adults 1 before MT (Pro)
catalog[3].level === data true
var pattern = /[^а-яА-ЯёЁa-zA-Z0-9]+/g;
<b>I`m vasya [], and you?</b>
, потом [] заменяется на span редактируемый, и получаем конструкцию