Serialize type.
@param {edb.Object|edb.Array} type
@param @optional {function} filter
@param @optional {String|number} tabs
@returns {String}
503939
function(type, filter, tabs) {
			if (isType(type)) {
				return JSON.stringify(parse(type), filter, tabs);
			} else {
				throw new TypeError("Expected edb.Object|edb.Array");
			}
		}
929573
public static <T> T[] filter(T[] array, Filter<T> filter) {
		if(null == filter) {
			return array;
		}
		
		final ArrayList<T> list = new ArrayList<T>(array.length);
		for (T t : array) {
			if (filter.accept(t)) {
				list.add(t);
			}
		}
		final T[] result = newArray(array.getClass().getComponentType(), list.size());
		return list.toArray(result);
	}
421933
function parseOptions(type, options) {
    const ret = {
        indentChar: " ",
        indentSize: 2,
        attribute: 1,
        closeBracket: 0,
    }

    if (Number.isSafeInteger(type)) {
        ret.indentSize = type
    } else if (type === "tab") {
        ret.indentChar = "\t"
        ret.indentSize = 1
    }
    if (Number.isSafeInteger(options.attribute)) {
        ret.attribute = options.attribute
    }
    if (Number.isSafeInteger(options.closeBracket)) {
        ret.closeBracket = options.closeBracket
    }

    return ret
}
493803
public function listFilesWithType(string $type, array $filter = null, array $sortOrder = null, array $limit = null) {
		$timeStamp = microtime(true);
	    $typeOpts = array('a', 'i', 'v', 'f', 'd', 'p', 's', 'c');
        if(!in_array($type, $typeOpts)){
	        throw new InvalidFileTypeException($type);
		}
        $filter[] = array(
            'glue' => ' and',
            'condition' => array(
                'column' => $this->entity['f']['alias'] . '.type',
                'comparison' => '=',
                'value' => $type)
        );
        $response = $this->listFiles($filter, $sortOrder, $limit);

		$response->stats->execution->start = $timeStamp;
		$response->stats->execution->end = microtime(true);

		return $response;
    }
886039
def filter_by_type():
    """"""
    if request.method == 'OPTIONS':
        return {}
    response = request.body.read().decode('utf-8')
    body = json.loads(response)
    stmts_json = body.get('statements')
    stmt_type_str = body.get('type')
    stmt_type_str = stmt_type_str.capitalize()
    stmt_type = getattr(sys.modules[__name__], stmt_type_str)
    stmts = stmts_from_json(stmts_json)
    stmts_out = ac.filter_by_type(stmts, stmt_type)
    return _return_stmts(stmts_out)
218885
function exportFilter(feed,filter,filterName) {

	var optionCount = 0;

	var s = '/**\n';
	s += '* '+filter.title+'\n';
	if (filter.href) {
		if (!checkHref(filter.href,filter.name)) {
			console.log('! filter '+filterName+'('+filter.name+') does not appear in');
			console.log('  '+filter.href);
		}
		s += '* '+filter.href+'\n';
	}
	if (filter.type) {
		s += '* type = '+filter.type+'\n';
	}
	if (filter.default) {
		s += '* default = '+filter.default+'\n';
	}
	if (filter.multiple_values) {
		s += '* multiple_values = '+filter.multiple_values+'\n';
	}
	if (filter.min_value) {
		s += '* min_value = '+filter.min_value+'\n';
	}
	if (filter.max_value) {
		s += '* max_value = '+filter.max_value+'\n';
	}
	if (filter.depends_on) {
		s += '* depends_on = '+filter.depends_on+'\n';
	}
	if (filter.prefer) {
		s += '* prefer = '+filter.prefer+'\n';
	}
	if (filter.prohibits) {
		s += prohibits(filter.prohibits);
	}
	if (filter.affected_by) {
		if (filter.affected_by.filter) {
			for (var i=0;i<filter.affected_by.filter.length;i++) {
				s += '* is affected by filter '+filter.affected_by.filter[i].name+' ('+filter.affected_by.filter[i].description+')\n';
			}
		}
	}

	if (filter.option) {
		filter.option = toArray(filter.option);
		for (var i in filter.option) {
			var option = filter.option[i];
			if (option.title) {
				s += '* option: '+option.value+', '+option.title+'\n';
				s += '*/\n';
				var optionName = filterName+('-'+option.value).toCamelCase();
				cache.push(optionName+' : '+optionName +',\n');
				fs.appendFileSync(apijs, s+'const '+optionName+" = '"+filter.name+'='+encodeURIComponent(option.value)+"';\n", 'utf8');
				s = '/**\n';
				seen.push(optionName);
				//optionCount++;
			}
			if (option.href) {
				s += '* '+option.href+'\n';
				if (!checkHref(option.href,option.value)) {
					console.log('! option '+filterName+'('+option.value+') does not exist in');
					console.log('  '+option.href);
				}
			}

			var param = {};
			for (var p in params) {
				if (params[p].name == filter.name) {
					param = params[p];
				}
			}
			if (!param.name) {
				param.name = filter.name;
				param.in = 'query';
				param.description = filter.title;
				param.schema = {};
				param.schema.type = 'array';
				//param.collectionFormat = 'multi';
				param.schema.items = {};
				param.schema.items.type = 'string';
				param.required = false;
				param.schema.items.enum = [];
				params.push(param);
			}
			param.schema.items.enum.push(option.value);

			// TODO unstable filters

		}
	}
	s += '*/\n';
	fs.appendFileSync(apijs, s+'const '+filterName+" = '"+filter.name+"';\n", 'utf8');
	cache.push(filterName + ' : '+filterName +',\n');

	if (optionCount<1) {
		var param = {};
		for (var p in params) {
			if (params[p].name == filter.name) {
				param = params[p];
			}
		}
		if (!param.name) {
			param.name = filter.name;
			param.in = 'query';
			param.description = filter.title;
			param.schema = {};
			param.schema.type = filter.type;
			if (filter.type == 'PID') {
				param.schema.type = 'string';
				param.schema.minLength = 8;
				param.schema.pattern = "^([0-9,a-d,f-h,j-n,p-t,v-z]){8,}$";
			}
			if (filter.type == 'ID') {
				param.schema.type = 'string';
			}
			if (filter.type == 'datetime') {
				param.schema.type = 'string';
				param.schema.format = 'date-time';
			}
			if (filter.type == 'date') {
				param.schema.type = 'string';
				param.schema.format = 'date';
			}
			if (filter.type == 'character') {
				param.schema.type = 'string';
				param.schema.minLength = 1;
				param.schema.maxLength = 1;
			}
			if (filter.default) {
				param.schema.default = filter.default;
				if (param.schema.type == 'integer') {
					param.schema.default = parseInt(filter.default,10);
				}
			}
			if (filter.min_value) {
				param.schema.minimum = filter.min_value;
			}
			if (filter.max_value) {
				param.schema.maximum = filter.max_value;
			}
			if (filter.multiple_values === true) {
				param.schema.items = {};
				param.schema.items.type = param.schema.type;
				param.schema.type = 'array';
				//param.collectionFormat = 'multi';
				if (param.schema.default) {
					param.schema.items.default = param.schema.default;
					delete param.schema.default;
				}
				if (param.schema.pattern) {
					param.schema.items.pattern = param.schema.pattern;
					delete param.schema.pattern;
				}
				if (param.schema.minLength) {
					param.schema.items.minLength = param.schema.minLength;
					delete param.schema.minLength;
				}
				if (param.schema.maxLength) {
					param.schema.items.maxLength = param.schema.maxLength;
					delete param.schema.maxLength;
				}
			}
			param.required = false;
			if (filter.release_status == 'deprecated') {
				param.deprecated = true;
			}
			params.push(param);
		}
	}

	return optionCount;
}
194703
public static boolean arrayFilter(String type) {

        int lastIndex = type.lastIndexOf(ARRAY_PREFIX);
        if (lastIndex == -1) {
            return false;
        }

        String arrayType = type.substring(lastIndex + 1);

        return nameFilter(arrayType);
    }
514991
def filters(type=nil)
      unless(type)
        @filters.dup
      else
        const = Splib.find_const(type)
        type = const unless const.nil?
        @filters[type] ? @filters[type].dup : nil
      end
    end
341205
def write_filter_column(col_id, type, *filters) #:nodoc:
      @writer.tag_elements('filterColumn', [ ['colId', col_id] ]) do
        if type == 1
          # Type == 1 is the new XLSX style filter.
          write_filters(*filters)
        else
          # Type == 0 is the classic "custom" filter.
          write_custom_filters(*filters)
        end
      end
    end
896650
function (src, filter) {
    var out = {}, i;
    for (i=0; i<filter.length; i++) {
      if (src[filter[i]] !== undefined) {
        out[filter[i]] = src[filter[i]];
      }
    }
    return out;
  }
1125639
function prepareTypesArg (types) {
  if (Array.isArray(types)) {
    return types
  }
  if (types instanceof String) {
    types += ''
  }
  if (typeof types === 'string') {
    return types.trim().split(' ').filter(Boolean)
  }
  return [types]
}
919218
public String visitTypes(List<Type> ts, Locale locale) {
        ListBuffer<String> sbuf = new ListBuffer<>();
        for (Type t : ts) {
            sbuf.append(visit(t, locale));
        }
        return sbuf.toList().toString();
    }
814295
function (type) {
    return function (opts) {
        var opt = opts || {};
        var userAttrs = getUserAttrs(opt);
        var w = {
            classes: opt.classes,
            type: type,
            formatValue: function (value) {
                return (value || value === 0) ? value : null;
            }
        };
        w.toHTML = function (name, field) {
            var f = field || {};
            var attrs = {
                type: type,
                name: name,
                id: f.id === false ? false : (f.id || true),
                classes: w.classes,
                value: w.formatValue(f.value)
            };
            return tag('input', [attrs, userAttrs, w.attrs || {}]);
        };
        return w;
    };
}
1065783
private void copyType(UserAgentInfo retObj, Long idBrowser) {
        try {
            lock.lock();

            BrowserEntry be = browserMap.get(idBrowser);
            if (be != null) {
                Long type = be.getType();
                if (type != null) {
                    String typeString = browserTypeMap.get(type);
                    if (typeString != null) {
                        retObj.setTyp(typeString);
                    }
                }
            }
        } finally {
            lock.unlock();
        }
    }
44074
function(type) {

	var items = _.filter(process.env, function(value, key) {

		var pattern = new RegExp('CORS\_ALLOWED\_' + type.toUpperCase(), 'i')

		return key.match(pattern);

	});

	return items.join(', ') || '*';

}
120478
function( type, obj ) {
		var tmp,
			count = 1,
			defer = jQuery.Deferred(),
			elements = this,
			i = this.length,
			resolve = function() {
				if ( !( --count ) ) {
					defer.resolveWith( elements, [ elements ] );
				}
			};

		if ( typeof type !== "string" ) {
			obj = type;
			type = undefined;
		}
		type = type || "fx";

		while ( i-- ) {
			tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
			if ( tmp && tmp.empty ) {
				count++;
				tmp.empty.add( resolve );
			}
		}
		resolve();
		return defer.promise( obj );
	}
617941
function serializeData(options) {
    if (isObject(options.data)) options.data = $.param(options.data)
    if (options.data && (!options.type || options.type.toUpperCase() == 'GET'))
      options.url = appendQuery(options.url, options.data)
  }