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.13 kB
import _newArrowCheck from"babel-runtime/helpers/newArrowCheck";import{remove,replace}from"@jumpn/utils-array";import{hasIn}from"@jumpn/utils-composite";import _extends from"babel-runtime/helpers/extends";import _objectWithoutProperties from"babel-runtime/helpers/objectWithoutProperties";var _this$2=void 0,findIndex=function(e,r,i){return _newArrowCheck(this,_this$2),e.findIndex(hasIn([r],i))}.bind(void 0),_this$1=void 0,refresh=function(e){return _newArrowCheck(this,_this$1),function(r){return _newArrowCheck(this,_this$1),replace(findIndex(r,"request",e.request),[e],r)}.bind(this)}.bind(void 0),_this$3=void 0,unobserve$2=function(e,r){_newArrowCheck(this,_this$3);var i=e.observers,t=_objectWithoutProperties(e,["observers"]);return _extends({},t,{observers:remove(i.indexOf(r),1,i)})}.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,unobserve=function(e,r,i){return _newArrowCheck(this,_this),updateNotifiers(e,refresh(unobserve$2(r,i))),e}.bind(void 0);export default unobserve; //# sourceMappingURL=unobserve.js.map