@visulima/fs
Version:
Human friendly file system utilities for Node.js
8 lines (6 loc) • 310 B
JavaScript
const assertValidFileOrDirectoryPath = (fileOrDirectoryPath) => {
if (!fileOrDirectoryPath || !(fileOrDirectoryPath instanceof URL) && typeof fileOrDirectoryPath !== "string") {
throw new TypeError("Path must be a non-empty string or URL.");
}
};
export { assertValidFileOrDirectoryPath as default };