reason-log-update

3.0.0-beta.2 • Public • Published

reason-log-update

bucklescript bindings to log-update

Installation

npm install reason-log-update log-update --save

Then add reason-log-update to bs-dependencies in bsconfig.json

{ 
  ... 
  "bs-dependencies": [
    ...
    "reason-log-update"
  ]
}

Usage

let frames = [|"-", "\\", "|", "/"|];
let i = ref(0);

let interval =
  Js.Global.setInterval(
    () => {
      i := (i^ + 1) mod Array.length(frames);
      let frame = frames[i^];
      LogUpdate.update(
        {j|
        ♥♥
   $frame unicorns $frame
        ♥♥
|j},
      );
    },
    80,
  );

ignore(Js.Global.setTimeout(() => Js.Global.clearInterval(interval), 3000));

API

See the LogUpdate.re and the documentation;

Readme

Keywords

none

Package Sidebar

Install

npm i reason-log-update

Weekly Downloads

1

Version

3.0.0-beta.2

License

MIT

Unpacked Size

2.72 kB

Total Files

8

Last publish

Collaborators

  • dean177