All files / TypeGuards isValidLastResults.ts

100% Statements 3/3
100% Branches 8/8
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19        1x 10x                       1x  
import {
  TUUIDLastResults,
} from '../TypeAliases/TUUIDLastResults';
 
export const isValidLastResults = (maybe: any): maybe is TUUIDLastResults => (
  Boolean(
    typeof maybe === 'object' &&
    maybe &&
    Array.isArray(maybe.clockSequence) &&
    maybe.clockSequence.length === 2 &&
    Array.isArray(maybe.nodeIdentifier) &&
    maybe.nodeIdentifier.length === 8 &&
    Array.isArray(maybe.timestamp) &&
    maybe.timestamp.length === 6
  )
);
 
export default isValidLastResults;