gentle-path-truncate (npm): A package which nicely truncates path strings.
Keywords: path|truncate