allow empty strings as option values

This commit is contained in:
dragonwocky 2021-10-12 18:39:04 +11:00
parent 5f52f520f4
commit cc1418ee5d

View File

@ -170,7 +170,7 @@ export const is = async (value, type, { extension = '' } = {}) => {
case 'number':
return typeof value === type && extension;
case 'string':
return typeof value === type && value.length && extension;
return typeof value === type && extension;
case 'alphanumeric':
case 'uuid':
case 'semver':