UNPKG

fumadocs-core

Version:

The library for building a documentation website in any React.js framework

20 lines (17 loc) 713 B
import Negotiator from 'negotiator'; declare function getNegotiator(request: Request): Negotiator; /** * Rewrite incoming path matching the `source` pattern into the `destination` pattern. * * See [`path-to-regexp`](https://github.com/pillarjs/path-to-regexp) for accepted pattern formats. * * @param source - the original pattern of incoming paths * @param destination - the target pattern to convert into */ declare function rewritePath(source: string, destination: string): { rewrite(pathname: string): string | false; }; declare function isMarkdownPreferred(request: Request, options?: { markdownMediaTypes?: string[]; }): boolean; export { getNegotiator, isMarkdownPreferred, rewritePath };