@farmfe/core
Version:
Farm is a extremely fast web build tool written in Rust. Farm can start a project in milliseconds and perform HMR within 10ms, making it much faster than similar tools like webpack and vite.
15 lines • 382 B
JavaScript
const windowsSlashRE = /\\/g;
export function slash(p) {
return p.replace(windowsSlashRE, '/');
}
export function withTrailingSlash(path) {
if (path[path.length - 1] !== '/') {
return `${path}/`;
}
return path;
}
const postfixRE = /[?#].*$/;
export function stripQueryAndHash(path) {
return path.replace(postfixRE, '');
}
//# sourceMappingURL=path.js.map