Types/OpenPackage.Part/get_Extension.ps1

<#
.SYNOPSIS
    Gets a part extensions
.DESCRIPTION
    Gets the file extension of a package part.

    This is anything after the last `.` in the part uri.
#>

param()

# If there is no uri, there is no extension
if (-not $this.Uri) { return }

# Split by periods, ignore any blanks, and return the last segment.
@($this.Uri -split '\.' -ne '')[-1]