# README
go-js-promise
Go WebAssembly utility package for interacting with JavaScript promises, and aiming to have an "idiomatic Go" API.
Show your support
Give a āļø and/or sponsor if this project helped you!
Author
š¤ Nicolas Lepage
- Website: https://nicolas.lepage.dev/
- Twitter: @njblepage
- Github: @nlepage
š¤ Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
š License
Copyright Ā© 2021 Nicolas Lepage.
This project is Apache 2.0 licensed.
# Functions
All waits for a given list of promises to be resolved and returns a list of the results.
AllSettled waits for a given list of promises to be fulfilled or rejected.
Any returns the result of the first fulfilled promise in a given list of promises.
Await waits for the given Promise to be resolved or rejected.
New creates a JavaScript Promise.
Race returns the result of the first fulfilled or rejected promise in a given list of promises.
Reject creates a JavaScript Promise rejected with a given value.
Resolve creates a JavaScript Promise resolved with a given value.
# Type aliases
AggregateError is a JavaScript object representing an error when several errors need to be wrapped in a single error.
Reason is a JavaScript value a promise was rejected with.
Result is a JavaScript object that describes the outcome of a promise.