How to use the bs-platform/lib/js/js_dict.js.get function in bs-platform

To help you get started, we’ve selected a few bs-platform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nars-dev / nars / packages / nars / src / NarsReconciler.bs.js View on Github external
Belt_SetString.forEachU(Belt_SetString.union(newSet, oldSet), (function (key) {
          if (Js_dict.get(newProps$1, key) !== Js_dict.get(oldProps$1, key)) {
            changedProps.push(key);
            return /* () */0;
          } else {
            return /* () */0;
          }
        }));
  return changedProps;
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
}
                          } else {
                            tmp$14 = undefined;
                          }
                          var match$36 = Js_dict.get(value$9, "album");
                          var tmp$15;
                          if (match$36 !== undefined) {
                            var value$15 = Caml_option.valFromOption(match$36);
                            var match$37 = Js_json.decodeNull(value$15);
                            if (match$37 !== undefined) {
                              tmp$15 = undefined;
                            } else {
                              var match$38 = Js_json.decodeObject(value$15);
                              var tmp$16;
                              if (match$38 !== undefined) {
                                var match$39 = Js_dict.get(Caml_option.valFromOption(match$38), "images");
                                var tmp$17;
                                if (match$39 !== undefined) {
                                  var value$16 = Caml_option.valFromOption(match$39);
                                  var match$40 = Js_json.decodeNull(value$16);
                                  if (match$40 !== undefined) {
                                    tmp$17 = undefined;
                                  } else {
                                    var match$41 = Js_json.decodeArray(value$16);
                                    tmp$17 = match$41 !== undefined ? match$41.map((function (value) {
                                              var match = Js_json.decodeObject(value);
                                              if (match !== undefined) {
                                                var match$1 = Js_dict.get(Caml_option.valFromOption(match), "url");
                                                var tmp;
                                                if (match$1 !== undefined) {
                                                  var value$1 = Caml_option.valFromOption(match$1);
                                                  var match$2 = Js_json.decodeNull(value$1);
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
if (match$1 !== undefined) {
      var match$2 = Js_json.decodeObject(Caml_option.valFromOption(match$1));
      if (match$2 !== undefined) {
        var match$3 = Js_dict.get(Caml_option.valFromOption(match$2), "me");
        var tmp$1;
        if (match$3 !== undefined) {
          var value$1 = Caml_option.valFromOption(match$3);
          var match$4 = Js_json.decodeNull(value$1);
          if (match$4 !== undefined) {
            tmp$1 = undefined;
          } else {
            var match$5 = Js_json.decodeObject(value$1);
            var tmp$2;
            if (match$5 !== undefined) {
              var value$2 = Caml_option.valFromOption(match$5);
              var match$6 = Js_dict.get(value$2, "id");
              var tmp$3;
              if (match$6 !== undefined) {
                var value$3 = Caml_option.valFromOption(match$6);
                var match$7 = Js_json.decodeNull(value$3);
                if (match$7 !== undefined) {
                  tmp$3 = undefined;
                } else {
                  var match$8 = Js_json.decodeString(value$3);
                  tmp$3 = match$8 !== undefined ? match$8 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$3));
                }
              } else {
                tmp$3 = undefined;
              }
              var match$9 = Js_dict.get(value$2, "player");
              var tmp$4;
              if (match$9 !== undefined) {
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
var value$9 = Caml_option.valFromOption(match$20);
                          var match$21 = Js_dict.get(value$9, "id");
                          var tmp$10;
                          if (match$21 !== undefined) {
                            var value$10 = Caml_option.valFromOption(match$21);
                            var match$22 = Js_json.decodeNull(value$10);
                            if (match$22 !== undefined) {
                              tmp$10 = undefined;
                            } else {
                              var match$23 = Js_json.decodeString(value$10);
                              tmp$10 = match$23 !== undefined ? match$23 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$10));
                            }
                          } else {
                            tmp$10 = undefined;
                          }
                          var match$24 = Js_dict.get(value$9, "name");
                          var tmp$11;
                          if (match$24 !== undefined) {
                            var value$11 = Caml_option.valFromOption(match$24);
                            var match$25 = Js_json.decodeNull(value$11);
                            if (match$25 !== undefined) {
                              tmp$11 = undefined;
                            } else {
                              var match$26 = Js_json.decodeString(value$11);
                              tmp$11 = match$26 !== undefined ? match$26 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$11));
                            }
                          } else {
                            tmp$11 = undefined;
                          }
                          var match$27 = Js_dict.get(value$9, "artists");
                          var tmp$12;
                          if (match$27 !== undefined) {
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
}
                          var match$30 = Js_dict.get(value$9, "durationMs");
                          var tmp$13;
                          if (match$30 !== undefined) {
                            var value$13 = Caml_option.valFromOption(match$30);
                            var match$31 = Js_json.decodeNull(value$13);
                            if (match$31 !== undefined) {
                              tmp$13 = undefined;
                            } else {
                              var match$32 = Js_json.decodeNumber(value$13);
                              tmp$13 = match$32 !== undefined ? match$32 | 0 : Js_exn.raiseError("graphql_ppx: Expected int, got " + JSON.stringify(value$13));
                            }
                          } else {
                            tmp$13 = undefined;
                          }
                          var match$33 = Js_dict.get(value$9, "href");
                          var tmp$14;
                          if (match$33 !== undefined) {
                            var value$14 = Caml_option.valFromOption(match$33);
                            var match$34 = Js_json.decodeNull(value$14);
                            if (match$34 !== undefined) {
                              tmp$14 = undefined;
                            } else {
                              var match$35 = Js_json.decodeString(value$14);
                              tmp$14 = match$35 !== undefined ? match$35 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$14));
                            }
                          } else {
                            tmp$14 = undefined;
                          }
                          var match$36 = Js_dict.get(value$9, "album");
                          var tmp$15;
                          if (match$36 !== undefined) {
github OneGraph / onegraph-examples / spotify-app / src / GetUsername.bs.js View on Github external
function parse(value) {
  var match = Js_json.decodeObject(value);
  if (match !== undefined) {
    var match$1 = Js_dict.get(Caml_option.valFromOption(match), "me");
    var tmp;
    if (match$1 !== undefined) {
      var match$2 = Js_json.decodeObject(Caml_option.valFromOption(match$1));
      if (match$2 !== undefined) {
        var match$3 = Js_dict.get(Caml_option.valFromOption(match$2), "spotify");
        var tmp$1;
        if (match$3 !== undefined) {
          var value$1 = Caml_option.valFromOption(match$3);
          var match$4 = Js_json.decodeNull(value$1);
          if (match$4 !== undefined) {
            tmp$1 = undefined;
          } else {
            var match$5 = Js_json.decodeObject(value$1);
            var tmp$2;
            if (match$5 !== undefined) {
              var value$2 = Caml_option.valFromOption(match$5);
github OneGraph / onegraph-examples / spotify-app / src / GetUsername.bs.js View on Github external
var value$2 = Caml_option.valFromOption(match$5);
              var match$6 = Js_dict.get(value$2, "id");
              var tmp$3;
              if (match$6 !== undefined) {
                var value$3 = Caml_option.valFromOption(match$6);
                var match$7 = Js_json.decodeNull(value$3);
                if (match$7 !== undefined) {
                  tmp$3 = undefined;
                } else {
                  var match$8 = Js_json.decodeString(value$3);
                  tmp$3 = match$8 !== undefined ? match$8 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$3));
                }
              } else {
                tmp$3 = undefined;
              }
              var match$9 = Js_dict.get(value$2, "displayName");
              var tmp$4;
              if (match$9 !== undefined) {
                var value$4 = Caml_option.valFromOption(match$9);
                var match$10 = Js_json.decodeNull(value$4);
                if (match$10 !== undefined) {
                  tmp$4 = undefined;
                } else {
                  var match$11 = Js_json.decodeString(value$4);
                  tmp$4 = match$11 !== undefined ? match$11 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$4));
                }
              } else {
                tmp$4 = undefined;
              }
              tmp$2 = {
                id: tmp$3,
                displayName: tmp$4
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
}
                          var match$33 = Js_dict.get(value$9, "href");
                          var tmp$14;
                          if (match$33 !== undefined) {
                            var value$14 = Caml_option.valFromOption(match$33);
                            var match$34 = Js_json.decodeNull(value$14);
                            if (match$34 !== undefined) {
                              tmp$14 = undefined;
                            } else {
                              var match$35 = Js_json.decodeString(value$14);
                              tmp$14 = match$35 !== undefined ? match$35 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$14));
                            }
                          } else {
                            tmp$14 = undefined;
                          }
                          var match$36 = Js_dict.get(value$9, "album");
                          var tmp$15;
                          if (match$36 !== undefined) {
                            var value$15 = Caml_option.valFromOption(match$36);
                            var match$37 = Js_json.decodeNull(value$15);
                            if (match$37 !== undefined) {
                              tmp$15 = undefined;
                            } else {
                              var match$38 = Js_json.decodeObject(value$15);
                              var tmp$16;
                              if (match$38 !== undefined) {
                                var match$39 = Js_dict.get(Caml_option.valFromOption(match$38), "images");
                                var tmp$17;
                                if (match$39 !== undefined) {
                                  var value$16 = Caml_option.valFromOption(match$39);
                                  var match$40 = Js_json.decodeNull(value$16);
                                  if (match$40 !== undefined) {
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
}
                                          } else {
                                            tmp = undefined;
                                          }
                                          return {
                                                  name: tmp
                                                };
                                        } else {
                                          return Js_exn.raiseError("graphql_ppx: Object is not a value");
                                        }
                                      })) : Js_exn.raiseError("graphql_ppx: Expected array, got " + JSON.stringify(value$12));
                            }
                          } else {
                            tmp$12 = undefined;
                          }
                          var match$30 = Js_dict.get(value$9, "durationMs");
                          var tmp$13;
                          if (match$30 !== undefined) {
                            var value$13 = Caml_option.valFromOption(match$30);
                            var match$31 = Js_json.decodeNull(value$13);
                            if (match$31 !== undefined) {
                              tmp$13 = undefined;
                            } else {
                              var match$32 = Js_json.decodeNumber(value$13);
                              tmp$13 = match$32 !== undefined ? match$32 | 0 : Js_exn.raiseError("graphql_ppx: Expected int, got " + JSON.stringify(value$13));
                            }
                          } else {
                            tmp$13 = undefined;
                          }
                          var match$33 = Js_dict.get(value$9, "href");
                          var tmp$14;
                          if (match$33 !== undefined) {
github OneGraph / onegraph-examples / spotify-app / src / GetCurrentlyPlayingQuery.bs.js View on Github external
var value$2 = Caml_option.valFromOption(match$5);
              var match$6 = Js_dict.get(value$2, "id");
              var tmp$3;
              if (match$6 !== undefined) {
                var value$3 = Caml_option.valFromOption(match$6);
                var match$7 = Js_json.decodeNull(value$3);
                if (match$7 !== undefined) {
                  tmp$3 = undefined;
                } else {
                  var match$8 = Js_json.decodeString(value$3);
                  tmp$3 = match$8 !== undefined ? match$8 : Js_exn.raiseError("graphql_ppx: Expected string, got " + JSON.stringify(value$3));
                }
              } else {
                tmp$3 = undefined;
              }
              var match$9 = Js_dict.get(value$2, "player");
              var tmp$4;
              if (match$9 !== undefined) {
                var value$4 = Caml_option.valFromOption(match$9);
                var match$10 = Js_json.decodeNull(value$4);
                if (match$10 !== undefined) {
                  tmp$4 = undefined;
                } else {
                  var match$11 = Js_json.decodeObject(value$4);
                  var tmp$5;
                  if (match$11 !== undefined) {
                    var value$5 = Caml_option.valFromOption(match$11);
                    var match$12 = Js_dict.get(value$5, "isPlaying");
                    var tmp$6;
                    if (match$12 !== undefined) {
                      var value$6 = Caml_option.valFromOption(match$12);
                      var match$13 = Js_json.decodeNull(value$6);