@wildcards/reason-apollo
Version:
Using Apollo client 2 with Reason
30 lines (25 loc) • 634 B
JavaScript
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
import * as Js_json from "bs-platform/lib/es6/js_json.js";
import * as Caml_option from "bs-platform/lib/es6/caml_option.js";
function getNonEmptyObj(jsObj) {
if (jsObj == null) {
return ;
} else {
var match = Js_json.decodeObject(jsObj);
if (match !== undefined) {
var data = Caml_option.valFromOption(match);
var match$1 = Object.keys(data).length;
if (match$1 !== 0) {
return Caml_option.some(data);
} else {
return ;
}
} else {
return ;
}
}
}
export {
getNonEmptyObj ,
}
/* No side effect */