public/render-page.js
/**
                         * Remove a prefix from a string. Return the input string if the given prefix
                         * isn't found.
                         */
Remove a prefix from a string. Return the input string if the given prefix
isn't found.
Remove a prefix from a string . Return the input string if the given prefix isn ' t found .
function stripPrefix(str, prefix = ``) {
                            if (!prefix) {
                                return str;
                            }
                            if (str === prefix) {
                                return `/`;
                            }
                            if (str.startsWith(`${prefix}/`)) {
                                return str.slice(prefix.length);
                            }
                            return str;
                        }
function stripPrefix ( str , prefix = ` ` ) { if ( ! prefix ) { return str ; } if ( str === prefix ) { return ` ` ; } if ( str . startsWith ( ` ${ prefix } ` ) ) { return str . slice ( prefix . length ) ; } return str ; }
Remove a prefix from a string.
Remove a prefix from a string .