Files
pnpm/lockfile/utils/src/refIsLocalTarball.ts
T

8 lines
295 B
TypeScript

export function refIsLocalTarball (ref: string): boolean {
return ref.startsWith('file:') && (ref.endsWith('.tgz') || ref.endsWith('.tar.gz') || ref.endsWith('.tar'))
}
export function refIsLocalDirectory (ref: string): boolean {
return ref.startsWith('file:') && !refIsLocalTarball(ref)
}