Enforces a configurable data-retention window by filtering out expired entries.
GDPR Article 5(1)(e) — Storage limitation principle.
const policy = new RetentionPolicy(30 * 24 * 60 * 60 * 1000); // 30 daysconst fresh = policy.enforce(auditLogger.getLogs()); Copy
const policy = new RetentionPolicy(30 * 24 * 60 * 60 * 1000); // 30 daysconst fresh = policy.enforce(auditLogger.getLogs());
0.9.0
Private
Readonly
Returns only entries whose timestamp is within the retention window.
Returns true if the given entry has exceeded the retention period.
true
Enforces a configurable data-retention window by filtering out expired entries.
GDPR Article 5(1)(e) — Storage limitation principle.
Example
Since
0.9.0