UNPKG

@splitsoftware/splitio-commons

Version:
11 lines (10 loc) 452 B
import { ImpressionObserver } from './ImpressionObserver'; import { hash128 } from '../../utils/murmur3/murmur3_128_x86'; import { buildKey } from './buildKey'; export function hashImpression128(impression) { return hash128(buildKey(impression)); } var LAST_SEEN_CACHE_SIZE = 500000; // cache up to 500k impression hashes export function impressionObserverSSFactory() { return new ImpressionObserver(LAST_SEEN_CACHE_SIZE, hashImpression128); }