all files / src/util/ checkDefined.ts

75% Statements 6/8
0% Branches 0/2
0% Functions 0/2
75% Lines 6/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                                                  
import provide from './provide';
let nm = provide('util.checkDefined');
 
/**
 * check if the input is undefined or null
 * @param input - input pointer
 * @returns true undefined or null
 */
export function undefinedOrNull (input): boolean{
    "use strict";
 
    return (typeof input === 'undefined' || input === null);
}
 
nm.undefinedOrNull = undefinedOrNull;
 
 
/**
 * check if the input is defined and not null
 * @param input - input pointer
 * @returns true defined and not null
 */
export function definedAndNotNull (input: any): boolean{
    "use strict";
 
    return !(undefinedOrNull(input));
}
 
nm.definedAndNotNull = definedAndNotNull;