object-shape-tester - v6.9.2
    Preparing search index...

    Function nonEmptyStringShape

    • Creates a shape that requires a non-empty string.

      Parameters

      • defaultValue: string = ' '

      Returns Shape<TUnsafe<string>>

      import {nonEmptyStringShape, checkValidShape} from 'object-shape-tester';

      const myShape = nonEmptyStringShape();

      checkValidShape(' ', myShape); // `true`
      checkValidShape('', myShape); // `false`