UNPKG

node-red-contrib-mysensors

Version:

Mysensors related nodes, for decoding / encoding mysensors serial protocol and MQTT topic, and wrapping arbitrary messages into mysensors compatible messages

14 lines (12 loc) 374 B
export class NullCheck { public static isDefinedOrNonNull<T>( subject: T | undefined | null, ): subject is T { return subject !== undefined && subject !== null; } public static isUndefinedOrNull<T>( subject: T | undefined | null, ): subject is undefined | null { return subject === undefined || subject === null; } }