import { join } from "path" ; import { IAsset } from "../../entities/Asset" ; import appendDotHtml from "./appendDotHtml" ; import appendIndexDotHtml from "./appendIndexDotHtml" ; export default function isCanonicalPath ( requestedPath , matchingAsset , fallbackAsset ) { return ( matchingAsset . path === requestedPath || join ( matchingAsset . path , "/" ) === requestedPath || matchingAsset . path === appendDotHtml ( requestedPath ) || matchingAsset . path === appendIndexDotHtml ( requestedPath ) || matchingAsset . path === fallbackAsset . path ) ; }