mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-14 04:06:45 +09:00
Common normalize logic
This commit is contained in:
+2
-2
@@ -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 + '.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user