src/vs/base/common/objects.ts/filter
export function filter(obj: obj, predicate: (key: string, value: any) => boolean): obj {
	const result = Object.create(null);
	for (const key of Object.keys(obj)) {
		if (predicate(key, obj[key])) {
			result[key] = obj[key];
		}
	}
	return result;
}