Files
standardnotes-app-web/packages/snjs/lib/Services/Protection/isValidProtectionSessionLength.ts

6 lines
268 B
TypeScript

import { UnprotectedAccessSecondsDuration } from './UnprotectedAccessSecondsDuration'
export function isValidProtectionSessionLength(number: unknown): boolean {
return typeof number === 'number' && Object.values(UnprotectedAccessSecondsDuration).includes(number)
}