Find the common ancestor of 2 or more paths on Windows or Unix
Give it two or more path strings, and it'll do the thing.
const ancestor =// output /a/bconsole// normalizes separators, but NOT cases, since it matters sometimesconsole// no common ancestor on different windows drive letters// so, this returns nullconsole
Returns the nearest (deepest) common ancestor path, or
null if on
different roots on Windows.