function removeQuery() {
	  for (var _len2 = arguments.length, fields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
	    fields[_key2] = arguments[_key2];
	  }

	  var removeQueries = function removeQueries(data) {
	    var _iteratorNormalCompletion2 = true;
	    var _didIteratorError2 = false;
	    var _iteratorError2 = undefined;

	    try {
	      for (var _iterator2 = fields[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
	        var field = _step2.value;

	        var value = (0, _utils.getByDot)(data, field); // prevent setByDot creating nested empty objects
	        if (value !== undefined) {
	          (0, _utils.setByDot)(data, field, undefined, true);
	        }
	      }
	    } catch (err) {
	      _didIteratorError2 = true;
	      _iteratorError2 = err;
	    } finally {
	      try {
	        if (!_iteratorNormalCompletion2 && _iterator2.return) {
	          _iterator2.return();
	        }
	      } finally {
	        if (_didIteratorError2) {
	          throw _iteratorError2;
	        }
	      }
	    }
	  };

	  var callback = function callback() {
	    return true;
	  };
	  if (typeof fields[fields.length - 1] === 'function') {
	    callback = fields.pop();
	    console.error('DEPRECATED Predicate func will be removed next version. (removeQuery)');
	  }

	  return function (hook) {
	    if (hook.type === 'after') {
	      var provider = hook.params.provider || 'server';
	      throw new errors.GeneralError('Provider \'' + provider + '\' cannot remove query params on after hook. (removeQuery)');
	    }
	    var result = hook.params.query;
	    var update = function update(condition) {
	      if (result && condition) {
	        removeQueries(result);
	      }
	      return hook;
	    };

	    var check = callback(hook);

	    return check && typeof check.then === 'function' ? check.then(update) : update(check);
	  };
	}
/**
	 * Remove the given fields from the query params.
	 * Can be used as a before hook for any service method.
	 *
	 * @param {Array.<string|Function>} fields - Field names to remove. Dot notation is supported.
	 * @returns {Function} hook function(hook)
	 *
	 * DEPRECATED: The last param may be a function to determine if the current hook should be updated.
	 * Its signature is func(hook) and it returns either a boolean or a promise resolving to a boolean.
	 * This boolean determines if the hook is updated.
	 *
	 * hooks.lowerCase('group', hook => hook.data.status === 1);
	 * hooks.lowerCase('group', hook => new Promise(resolve => {
	 *   setTimeout(() => { resolve(true); }, 100)
	 * }));
	 */
Remove the given fields from the query params.
Can be used as a before hook for any service method.

@param {Array.} fields - Field names to remove. Dot notation is supported.

The last param may be a function to determine if the current hook should be updated.
Its signature is func(hook) and it returns either a boolean or a promise resolving to a boolean.
This boolean determines if the hook is updated.


Remove the given fields from the query params . Can be used as a before hook for any service method . @param { Array . } fields - Field names to remove . Dot notation is supported . The last param may be a function to determine if the current hook should be updated . Its signature is func ( hook ) and it returns either a boolean or a promise resolving to a boolean . This boolean determines if the hook is updated .
function removeQuery() {
	  for (var _len2 = arguments.length, fields = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
	    fields[_key2] = arguments[_key2];
	  }
	  var removeQueries = function removeQueries(data) {
	    var _iteratorNormalCompletion2 = true;
	    var _didIteratorError2 = false;
	    var _iteratorError2 = undefined;
	    try {
	      for (var _iterator2 = fields[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
	        var field = _step2.value;
	        var value = (0, _utils.getByDot)(data, field); 
	        if (value !== undefined) {
	          (0, _utils.setByDot)(data, field, undefined, true);
	        }
	      }
	    } catch (err) {
	      _didIteratorError2 = true;
	      _iteratorError2 = err;
	    } finally {
	      try {
	        if (!_iteratorNormalCompletion2 && _iterator2.return) {
	          _iterator2.return();
	        }
	      } finally {
	        if (_didIteratorError2) {
	          throw _iteratorError2;
	        }
	      }
	    }
	  };
	  var callback = function callback() {
	    return true;
	  };
	  if (typeof fields[fields.length - 1] === 'function') {
	    callback = fields.pop();
	    console.error('DEPRECATED Predicate func will be removed next version. (removeQuery)');
	  }
	  return function (hook) {
	    if (hook.type === 'after') {
	      var provider = hook.params.provider || 'server';
	      throw new errors.GeneralError('Provider \'' + provider + '\' cannot remove query params on after hook. (removeQuery)');
	    }
	    var result = hook.params.query;
	    var update = function update(condition) {
	      if (result && condition) {
	        removeQueries(result);
	      }
	      return hook;
	    };
	    var check = callback(hook);
	    return check && typeof check.then === 'function' ? check.then(update) : update(check);
	  };
	}
function removeQuery ( ) { for ( var _len2 = arguments . length , fields = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) { fields [ _key2 ] = arguments [ _key2 ] ; } var removeQueries = function removeQueries ( data ) { var _iteratorNormalCompletion2 = true ; var _didIteratorError2 = false ; var _iteratorError2 = undefined ; try { for ( var _iterator2 = fields [ Symbol . iterator ] ( ) , _step2 ; ! ( _iteratorNormalCompletion2 = ( _step2 = _iterator2 . next ( ) ) . done ) ; _iteratorNormalCompletion2 = true ) { var field = _step2 . value ; var value = ( 0 , _utils . getByDot ) ( data , field ) ; if ( value !== undefined ) { ( 0 , _utils . setByDot ) ( data , field , undefined , true ) ; } } } catch ( err ) { _didIteratorError2 = true ; _iteratorError2 = err ; } finally { try { if ( ! _iteratorNormalCompletion2 && _iterator2 . return ) { _iterator2 . return ( ) ; } } finally { if ( _didIteratorError2 ) { throw _iteratorError2 ; } } } } ; var callback = function callback ( ) { return true ; } ; if ( typeof fields [ fields . length - 1 ] === 'function' ) { callback = fields . pop ( ) ; console . error ( 'DEPRECATED Predicate func will be removed next version. (removeQuery)' ) ; } return function ( hook ) { if ( hook . type === 'after' ) { var provider = hook . params . provider || 'server' ; throw new errors . GeneralError ( 'Provider \'' + provider + '\' cannot remove query params on after hook. (removeQuery)' ) ; } var result = hook . params . query ; var update = function update ( condition ) { if ( result && condition ) { removeQueries ( result ) ; } return hook ; } ; var check = callback ( hook ) ; return check && typeof check . then === 'function' ? check . then ( update ) : update ( check ) ; } ; }
Remove the given fields from the query params.
Remove the given fields from the query params .
// prevent setByDot creating nested empty objects