UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

24 lines 705 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.equalityAreConsistentlyDefined = void 0; /** * @public * Returns true if both `A` and `B` are both null, undefined or 'defined'. Defined is not null and not undefined. * @remarks * See {@link equalityAreConsistentlyDefined}. */ function equalityAreConsistentlyDefined(a, b) { if (a == null) { if (a === undefined) { return b === undefined; } else { return b === null; } } else { return b != null; } } exports.equalityAreConsistentlyDefined = equalityAreConsistentlyDefined; //# sourceMappingURL=equality-are-consistently-defined.js.map