@luolapeikko/ts-common
    Preparing search index...

    Function isNullish

    • Type guard check if the given value is null or undefined.

      Parameters

      • value: unknown

        The value to check

      Returns value is undefined | null

      True if the value is null or undefined, otherwise false

      const data = ['demo', null, undefined, 'demo'];
      const count = data.filter(isNullish).length; // 2

      v0.4.0