From cc1418ee5d1b12b7399b4cdbafec6db8f657b411 Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Tue, 12 Oct 2021 18:39:04 +1100 Subject: [PATCH] allow empty strings as option values --- api/fmt.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/fmt.mjs b/api/fmt.mjs index cb3ded8..314a813 100644 --- a/api/fmt.mjs +++ b/api/fmt.mjs @@ -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':