MCPcopy Index your code
hub / github.com/ether/etherpad / intervalStart

Function intervalStart

src/node/security/SecretRotator.ts:57–57  ·  view source on GitHub ↗
(t:number, interval:number)

Source from the content-addressed store, hash-verified

55// In JavaScript, the % operator is remainder, not modulus.
56const mod = (a:number, n:number) => ((a % n) + n) % n;
57const intervalStart = (t:number, interval:number) => t - mod(t, interval);
58
59/**
60 * Maintains an array of secrets across one or more Etherpad instances sharing the same database,

Callers 2

_deriveSecretsMethod · 0.70
_updateMethod · 0.70

Calls 1

modFunction · 0.70

Tested by

no test coverage detected