Include only items params with provided data
969499
def build_items_data(items_params)
      @document.items.map do |item|
        line = []
        line << item.name if items_params[:names]
        line << item.variable if items_params[:variables]
        line << item.quantity if items_params[:quantities]
        line << item.unit if items_params[:units]
        line << item.price if items_params[:prices]
        line << item.tax if items_params[:taxes]
        line << item.tax2 if items_params[:taxes2]
        line << item.tax3 if items_params[:taxes3]
        line << item.amount if items_params[:amounts]
        line
      end
    end
726321
def as_params(self):
        
        params = {}
        if self.has_filters:
            params['$filter'] = self.get_filters()
        if self.has_order:
            params['$orderby'] = self.get_order()
        if self.has_selects:
            params['$select'] = self.get_selects()
        if self.has_expands:
            params['$expand'] = self.get_expands()
        if self._search:
            params['$search'] = self._search
            params.pop('$filter', None)
            params.pop('$orderby', None)
        return params
1312142
def apply_with_get_params(params = {})
      base_path = apply_named_params(params)
      get_params = params.reject { |param_name| named_params.values.include?(param_name) }

      get_params.empty? ? base_path : "#{base_path}?#{URI.encode_www_form(get_params)}"
    end
949169
def with_params(self, params):
        
        return self.replace(params=_merge_maps(self.params, params))
667029
function(data, param) {
              var eol = getEol(data,param);
              var lines = data.split(eol);
              var partial = lines.pop();
              return {lines: lines, partial: partial};
            }
39910
def format_item(item, template, name='item'):
    """"""
    ctx = {name: item}
    return render_template_to_string(template, **ctx)
539360
def parameter_list(data):
        
        items = []
        for item in data:
            param = Parameter(item['name'], item['value'])
            if 'meta' in item: param.meta = item['meta']
            items.append(param)
        return items
20168
def prepare_params(request):
    """"""
    return request.replace(
        params={key: dump_param(val) for key, val in request.params.items()
                if val is not None})
978502
def insert_param(self, param):
        
        self._current_params = tuple([param] + list(self._current_params))
489511
def filter_params(self, value):
        
        if value is None:
            return {}
        target = ".".join(self.field.source_attrs)
        return { '__raw__': { target + ".$id": value } }
111350
function defaultShouldReload(items, params) {
    // Go through all and check if any redata shouldReload.
    for (const key in items) {
        if (items[key].shouldReload(params)) {
            return true;
        }
    }

    return false;
}
620618
def _parsed_items(items, sep=_SEP, **options):
    
    parse = _parse if options.get("ac_parse_value") else anyconfig.utils.noop
    for key, val in items:
        yield (key, parse(val, sep))
193978
function loadIncludes(data, current_file) {
  return data.replace(includeExpr, function(src, name, ext) {
    try {
      var include_path =
          path.join(current_file, "../", name+"."+(ext || "markdown"))
      return loadIncludes(fs.readFileSync(include_path, "utf8"), current_file);
    } catch(e) {
      return "";
    }
  });
}
1316451
def exclude(*args)
      args.flatten! # allow [] as a param
      args.collect!(&:to_sym) # symbolize the args
      # check respond_to? :to_sym, ActionColumns doesn't respond to to_sym
      @set.reject! { |c| c.respond_to?(:to_sym) && args.include?(c.to_sym) } # reject all items specified
    end
612354
def clean_parameters(self, params):
        ''''''
        return {k: v for k, v in params.items() if k in self.adapter.facets}
1084395
def _set_params(self):
        """"""
        # TODO: manage different in/out styles
        if self.docs['in']['params']:
            # list of parameters is like: (name, description, type)
            self.docs['out']['params'] = list(self.docs['in']['params'])
        for e in self.element['params']:
            if type(e) is tuple:
                # tuple is: (name, default)
                param = e[0]
            else:
                param = e
            found = False
            for i, p in enumerate(self.docs['out']['params']):
                if param == p[0]:
                    found = True
                    # add default value if any
                    if type(e) is tuple:
                        # param will contain: (name, desc, type, default)
                        self.docs['out']['params'][i] = (p[0], p[1], p[2], e[1])
            if not found:
                if type(e) is tuple:
                    p = (param, '', None, e[1])
                else:
                    p = (param, '', None, None)
                self.docs['out']['params'].append(p)
347675
function processItems ( items, values, guid, counter ) {
  	if ( counter === void 0 ) counter = 0;

  	return items.map( function ( item ) {
  		if ( item.type === TEXT ) {
  			return item.template;
  		}

  		if ( item.fragment ) {
  			if ( item.fragment.iterations ) {
  				return item.fragment.iterations.map( function ( fragment ) {
  					return processItems( fragment.items, values, guid, counter );
  				}).join( '' );
  			} else {
  				return processItems( item.fragment.items, values, guid, counter );
  			}
  		}

  		var placeholderId = "" + guid + "-" + (counter++);
  		var model = item.model || item.newModel;

  		values[ placeholderId ] = model ?
  			model.wrapper ?
  				model.wrapper.value :
  				model.get() :
  			undefined;

  		return '${' + placeholderId + '}';
  	}).join( '' );
  }