code: function _loop() {
  	      var name = functionsToWrap[k];
  	      originals[name] = store[name];
  	      store[name] = function () {
  	        for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  	          args[_key2] = arguments[_key2];
  	        }
  	
  	        if (!$rootScope.$$phase) {
  	          return $rootScope.$apply(function () {
  	            return originals[name].apply(store, args);
  	          });
  	        }
  	        return originals[name].apply(store, args);
  	      };
  	    }
docs: Wrap certain sync functions with $apply