bs-webapi-extra
v0.4.3
Published
Extra Web API bindings for ReasonML: WebCrypto, WebRTC, IndexedDB, WebSockets, Encoding, ...
Downloads
5
Maintainers
Readme
bs-webapi-extra
Playground for implementing various missing Web API bindings for ReasonML/BuckleScript, namely:
- WebRTC
- IndexedDB (example)
- WebCrypto (example)
- So far only RSASSA-PKCS1-v1_5 and SHA-256 is supported
- Navigator offline/online events (example)
- WebSockets (example)
- Encoding (TextEncoder, TextDecoder)
DISCLAIMER: Not all API methods from W3 standards are implemented and functions signatures may change from commit to commit in here. I plan to merge these APIs into the original bs-webapi-incubator as soon as the typical use cases feel comfortable to use.
Use
npm install bs-webapi-extra
and add a corresponding item to the bsconfig.json
:
"bs-dependencies": ["bs-webapi-extra"],
Development
Build
npm run build
Build + Watch
npm run start
Run Examples
Examples are compiled during npm run build
.
Create a single app.js
file for browser using
npm run pack
Open example/example.html
in your web browser. You don't need a running web server.
Feel free to comment out examples you're not interested in inside the example/example.re
file.
Editor
If you use vscode
, Press Windows + Shift + B
it will build automatically