@yookue/ts-lang-utils
    Preparing search index...

    Function endsWithAny

    • Returns whether the given string ends with any of the suffixes

      Parameters

      • Optionaltext: null | string

        the source string to check

      • Optionalsuffixes: (undefined | null | string)[]

        the target strings to compare

      Returns boolean

      whether the given string ends with any of the suffixes

      David Hsing

      endsWithAny('foobar', ['foo', 'bar']);    // true
      endsWithAny('hello', ['foo', 'bar']); // false