import { parse , format } from 'url' ; export function parseIndexUrl ( url ) { const parsed = parse ( url ) ; const { pathname , ... rest } = parsed ; return { node : format ( rest ) , index : pathname ! . replace ( '/' , '' ) , } ; }