Files
exploRUGComponent/docs-src/_includes/relative-path.cjs
2026-04-21 14:54:02 +05:45

10 lines
256 B
JavaScript

const path = require('path').posix;
module.exports = (base, p) => {
const relativePath = path.relative(base, p);
if (p.endsWith('/') && !relativePath.endsWith('/') && relativePath !== '') {
return relativePath + '/';
}
return relativePath;
};