All files / src/utils user.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 112x             2x 9x    
import { get } from 'lodash';
import { User } from '@accounts/types';
import { TwoFactorService } from '../types';
 
/**
 * Return the user two factor service object
 */
export const getUserTwoFactorService = (user: User): TwoFactorService | null => {
  return get(user, ['services', 'two-factor'], null);
};