All files / src/TypeGuards isUUIDOptions.ts

100% Statements 4/4
100% Branches 6/6
100% Functions 1/1
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 201x             1x 7x                   1x  
import {
  isUUIDVersion,
} from './isUUIDVersion';
import {
  IUUIDOptions,
} from '../UUID/UUIDOptions/IUUIDOptions';
 
export const isUUIDOptions = (maybe: any): maybe is IUUIDOptions => (
  Boolean(
    typeof maybe === 'object' &&
    maybe &&
    isUUIDVersion(maybe.version) &&
    typeof maybe.clockSequenceGetter === 'function' &&
    typeof maybe.nodeIdentifierGetter === 'function' &&
    typeof maybe.timestampGetter === 'function'
  )
);
 
export default isUUIDOptions;