UNPKG

redis-semaphore

Version:

Distributed mutex and semaphore based on Redis

8 lines (6 loc) 185 B
export function getQuorum(clientCount: number) { return Math.round((clientCount + 1) / 2) } export function smartSum(count: number, zeroOrOne: number) { return count + zeroOrOne }