Bump dev (w/ ts-eslint updates) (#1854)

* Bump dev (w/ ts-eslint updates)

* Adjust ipfs compat check
This commit is contained in:
Jaco
2023-07-15 09:57:35 +03:00
committed by GitHub
parent d407513dd1
commit 41caf2fd6d
68 changed files with 248 additions and 228 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ export function createValidate ({ chars, ipfs, type, withPadding }: Config): Val
return (value?: unknown, ipfsCompat?: boolean): value is string => {
if (typeof value !== 'string') {
throw new Error(`Expected ${type} string input`);
} else if (ipfs && ipfsCompat && value[0] !== ipfs) {
} else if (ipfs && ipfsCompat && !value.startsWith(ipfs)) {
throw new Error(`Expected ipfs-compatible ${type} to start with '${ipfs}'`);
}