silverwolf-x/project / packages /next /src /server /normalizers /prefixing-normalizer.ts
silverwolf-x's picture
download
raw
399 Bytes
import path from '../../shared/lib/isomorphic/path'
import type { Normalizer } from './normalizer'
export class PrefixingNormalizer implements Normalizer {
private readonly prefix: string
constructor(...prefixes: ReadonlyArray<string>) {
this.prefix = path.posix.join(...prefixes)
}
public normalize(pathname: string): string {
return path.posix.join(this.prefix, pathname)
}
}

Xet Storage Details

Size:
399 Bytes
·
Xet hash:
c3f3ec4992207d933d8f90fac295d4d8825fde0a2cfd369fa2c06cfc89610e25

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.