All files base.ts

100% Statements 46/46
100% Branches 4/4
100% Functions 3/3
100% Lines 46/46

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 481x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 431x 431x 431x    
/**
 * Copyright © 2020 2021 2022 7thCode.(http://seventh-code.com/)
 * This software is released under the MIT License.
 * opensource.org/licenses/mit-license.php
 */
 
"use strict";
 
/**
 * isNumber
 *
 * @remarks
 * is Number?
 *
 * @param value - unknown value.
 * @returns True/False
 */
export function isNumber(value: unknown): boolean {
    return ((typeof value === 'number') && (isFinite(value)));
}
 
/**
 * isValue
 *
 * @remarks
 * Value is not null or undef
 *
 * @param value
 * @returns  not null or undef
 */
export function isValue(value: unknown): boolean {
    return ((value !== null) && (typeof value !== 'undefined'));
}
/**
 * isObject
 *
 * @remarks
 * is Object or Array.
 * [] or {} is True.
 *
 * @param value - unknown value.
 * @returns True/False
 */
export function isContainer(value: unknown): boolean {
    return ((value !== null) && (typeof value === 'object'));
}