Files
now-deployment/node_modules/now/dist/util/path-helpers.ts
2019-10-17 12:36:15 +09:00

12 lines
250 B
TypeScript

import { relative as nativeRelative } from 'path';
const isWin = process.platform === 'win32';
export function relative(a: string, b: string): string {
let p = nativeRelative(a, b);
if (isWin) {
p = p.replace(/\\/g, '/');
}
return p;
}