wasm-bindgen/examples/fetch/index.js

13 lines
385 B
JavaScript
Raw Normal View History

const rust = import('./pkg/fetch');
2018-08-19 00:20:42 +03:00
rust
.then(m => {
return m.run().then((data) => {
console.log(data);
2018-08-19 00:20:42 +03:00
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);