@modern-js/utils
Version:
A Progressive React Framework for modern web development.
11 lines (10 loc) • 321 B
JavaScript
import "node:module";
import path from "path";
const ensureAbsolutePath = (base, filePath)=>path.isAbsolute(filePath) ? filePath : path.resolve(base, filePath);
const ensureArray = (params)=>{
if (Array.isArray(params)) return params;
return [
params
];
};
export { ensureAbsolutePath, ensureArray };