How to detect multihash?
linonetwo opened this issue · 2 comments
linonetwo commented
I want to do something like:
if (isMultihash(someString)) {
...
}
Can I do this with js-multihash
? Like using try catch or so:
try {
multihash.decode(Buffer(someString));
catch (error) {
throw new Error(`${someString} is not a multihash`);
}