silverwolf-x's picture
download
raw
598 Bytes
import type { Normalizer } from './normalizer'
/**
* Normalizers combines many normalizers into a single normalizer interface that
* will normalize the inputted pathname with each normalizer in order.
*/
export class Normalizers implements Normalizer {
constructor(private readonly normalizers: Array<Normalizer> = []) {}
public push(normalizer: Normalizer) {
this.normalizers.push(normalizer)
}
public normalize(pathname: string): string {
return this.normalizers.reduce<string>(
(normalized, normalizer) => normalizer.normalize(normalized),
pathname
)
}
}

Xet Storage Details

Size:
598 Bytes
·
Xet hash:
d91593d53162547af7dd7ad54a92ec781093210f6011df32a97139135d272269

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