Readd proper async
/await
keywords to examples/CLI, add default
case in cli.ts
#10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Regarding the
async
thing - As you have mentioned in commit 2e7997e11dd652f1dcfed0d84564ef6c76a7d2a7, you believe that the WASM build had made the need to useasync
/await
redundant. I want you to know, from my experience using it, that's not true.Let's just use the example you gave out in the
README
, and break it down piece by piece...Notice that it returns a
Promise
? That's a pretty big deal, because the lack of anawait
statement doesn't cause the value to be registered as properly fulfilled. Indeed, if we try to move onto the next piece...It's marked as Rejected. The code given is literally unusable.
Now, if we add the proper
await
keywords...It works as intended.
This issue has been addressed in both the already-described
README
, and the CLI you wrote as a demonstration of the library.Oh, and while we're on the subject of the library - A default case was added so that any users who didn't provide a
hash
orverify
flag would receive the following:I just thought that would be nice.