Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
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)
}
}