wildstar
    Preparing search index...

    Function leaf

    • Returns the last segment of a path, or '' if root

      Parameters

      • path: string

        The input path

      Returns string

      The last segment, or '' if input is root

      leaf('foo/bar/baz') // returns 'baz'
      leaf('c:/') // returns ''