UNPKG

@dillonkearns/elm-graphql

Version:

<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">

3 lines (2 loc) 1.2 kB
import _newArrowCheck from"babel-runtime/helpers/newArrowCheck";import _toConsumableArray from"babel-runtime/helpers/toConsumableArray";import _extends from"babel-runtime/helpers/extends";import _objectWithoutProperties from"babel-runtime/helpers/objectWithoutProperties";import{replace}from"@jumpn/utils-array";import{hasIn}from"@jumpn/utils-composite";var _this$1=void 0,observe$2=function(e,r){_newArrowCheck(this,_this$1);var t=e.observers,i=_objectWithoutProperties(e,["observers"]);return _extends({},i,{observers:[].concat(_toConsumableArray(t),[r])})}.bind(void 0),_this$3=void 0,findIndex=function(e,r,t){return _newArrowCheck(this,_this$3),e.findIndex(hasIn([r],t))}.bind(void 0),_this$2=void 0,refresh=function(e){return _newArrowCheck(this,_this$2),function(r){return _newArrowCheck(this,_this$2),replace(findIndex(r,"request",e.request),[e],r)}.bind(this)}.bind(void 0),_this$4=void 0,updateNotifiers=function(e,r){return _newArrowCheck(this,_this$4),e.notifiers=r(e.notifiers),e}.bind(void 0),_this=void 0,observe=function(e,r,t){return _newArrowCheck(this,_this),updateNotifiers(e,refresh(observe$2(r,t)))}.bind(void 0);export default observe; //# sourceMappingURL=observe.js.map