opened
strdr4605
username_0
https://repl.it/@KyleHenderson/mockingcase
and 
```ocaml
type options = {. "random": bool};

type varArg =
  | Str(string)
  | Arr(array(string));

[@bs.module]
external mOcKiNgCaSe: ('a, ~options: options=?, unit) => string =
  "mockingcase";

let bc_mock: (varArg, ~opts: options=?, unit) => string =
  (input, ~opts=?, ()) =>
    switch (input) {
    | Str(value) =>
      switch (opts) {
      | None => mOcKiNgCaSe(value, ())
      | Some(o) => mOcKiNgCaSe(value, ~options=o, ())
      }
    | Arr(value) =>
      switch (opts) {
      | None => mOcKiNgCaSe(value, ())
      | Some(o) => mOcKiNgCaSe(value, ~options=o, ())
      }
    };

let caseStr1 = bc_mock(Str("hello world"), ());
let caseStr2 = bc_mock(Str("hello world"), ~opts={"random": true}, ());

let caseArr1 = bc_mock(Arr([|"hello", " ", "world"|]), ());
let caseArr2 =
  bc_mock(Arr([|"hello", " ", "world"|]), ~opts={"random": true}, ());

Js.log(caseStr1);
Js.log(caseStr2);
Js.log(caseArr1);
Js.log(caseArr2);
```
Suggestions for improving the bindings
issue
closed
strdr4605
username_0
issue