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.

20 lines 513 B
/** * @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}. */ export function equalityAreConsistentlyDefined(a, b) { if (a == null) { if (a === undefined) { return b === undefined; } else { return b === null; } } else { return b != null; } } //# sourceMappingURL=equality-are-consistently-defined.js.map