Files
pnpm/lockfile/utils/src/refIsLocalTarball.ts
2024-07-28 01:35:40 +02:00

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)
}