foo-webview-sdk
    Preparing search index...

    Function formatHandleId

    • Build a canonical handle-id from a path + optional subsong index.

      • Returns '' for falsy / non-string path.
      • Subsong 0 (or non-numeric) collapses to the bare path; only strictly positive sub-song indices receive the |subsong:N tail.

      Parameters

      • path: string
      • subsong: number = 0

      Returns string

      formatHandleId('C:\\song.flac', 2) === 'C:\\song.flac|subsong:2'
      formatHandleId('C:\\song.flac') === 'C:\\song.flac'
      formatHandleId('') === ''