UNPKG

@modern-js/runtime-utils

Version:

A Progressive React Framework for modern web development.

12 lines (11 loc) 294 B
/** * we use `pathname.replace(/\/+$/, '')` to remove the '/' with end. * * examples: * * pathname1: '/api', pathname2: '/api/', * pathname1 as same as pathname2 * * pathname3: '/', the nomalizeResult also as '/' */ export declare function normalizePathname(pathname: string): string;