Add error to JsValue conversion and example (#691)

This commit is contained in:
John Gallagher
2019-10-30 16:30:32 -04:00
committed by Sean McArthur
parent 57300edbc4
commit 43f2ff083c
9 changed files with 6224 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
const rust = import('./pkg');
rust
.then(m => {
return m.run().then((data) => {
console.log(data);
console.log("The latest commit to the wasm-bindgen %s branch is:", data.name);
console.log("%s, authored by %s <%s>", data.commit.sha, data.commit.commit.author.name, data.commit.commit.author.email);
})
})
.catch(console.error);