import { removeSlashes } from './remove_slashes' ; export const appendAppPath = ( appBasePath , path = '' ) => { path = path === '' || path . startsWith ( '#' ) || path . startsWith ( '?' ) ? path : `/${ path }` ; const removeTrailing = path . indexOf ( '#' ) === - 1 && appBasePath . indexOf ( '#' ) === - 1 ; return removeSlashes ( `${ appBasePath }${ path }` , { trailing : removeTrailing , duplicates : true , leading : false , } ) ; } ;