Function upOneLevel

Removes the last segment of the url.

const url = upOneLevel('/first/second');

console.log(url); // '/first'
  • Parameters

    • url: string

    Returns string