bs-webapi-extra

0.4.3 • Public • Published

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

Package Sidebar

Install

npm i bs-webapi-extra

Weekly Downloads

2

Version

0.4.3

License

MIT

Unpacked Size

46.2 kB

Total Files

28

Last publish

Collaborators

  • jhrdina