Common normalize logic

This commit is contained in:
Will Boyd
2025-01-27 08:42:08 -05:00
parent 7cd5722195
commit 19c65b21e4
2 changed files with 28 additions and 28 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ export function boolean(value) {
return false;
}
throw 'Must be true or false.';
throw new Error('Must be true or false.');
}
export function filePath(value) {
@@ -27,6 +27,6 @@ export function filePath(value) {
if (fileExists) {
return absolute;
} else {
throw 'File not found at ' + absolute + '.';
throw new Error('File not found at ' + absolute + '.');
}
}