All files / common/utils shared.utils.ts

94.44% Statements 17/18
100% Branches 10/10
88.89% Functions 8/9
100% Lines 11/11
1 2 3 4 5 6 7 8 9 10 11 12 13 141x 75x 62x 4x 4x 2x 1x 5x     31x 4x 1x  
export const isUndefined = (obj): obj is undefined =>
  typeof obj === 'undefined';
export const isFunction = (fn): boolean => typeof fn === 'function';
export const isObject = (fn): fn is object => !isNil(fn) && typeof fn === 'object';
export const isString = (fn): fn is string => typeof fn === 'string';
export const isConstructor = (fn): boolean => fn === 'constructor';
export const validatePath = (path?: string): string =>
  path
    ? path.charAt(0) !== '/' ? '/' + path : path
    : '';
export const isNil = (obj): boolean => isUndefined(obj) || obj === null;
export const isEmpty = (array): boolean => !(array && array.length > 0);
export const isSymbol = (fn): fn is symbol => typeof fn === 'symbol';