@jakehamilton/titan
Version:
A little tool for big (monorepo) projects.
20 lines (16 loc) • 354 B
JavaScript
const path = require("path");
const isPath = (input) => {
return input !== path.basename(input);
};
const resolveRelative = (input, root = process.cwd()) => {
if (path.isAbsolute(input)) {
return input;
} else {
return path.resolve(root, input);
}
};
module.exports = {
...path,
isPath,
resolveRelative,
};