/
githubmirror
/
wp-calypso
Обзор
Документация
Войти
/
githubmirror
/
wp-calypso
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
client/state/posts/utils/get-normalized-posts-query.js
12 строк
442 B
Griffith Chen
Remove lodash mapValues, pickBy, and omitBy in favor of @automattic/js-utils (#111739)
17 июн 2026, 08:32
Не верифицирован
17 июн 2026, 08:32
9ee3ece
Код
Авторство
О чём код?
import { omitBy } from '@automattic/js-utils'; import { DEFAULT_POST_QUERY } from 'calypso/state/posts/constants'; /** * Returns a normalized posts query, excluding any values which match the * default post query. * @param {Object} query Posts query * @returns {Object} Normalized posts query */ export function getNormalizedPostsQuery( query ) { return omitBy( query, ( value, key ) => DEFAULT_POST_QUERY[ key ] === value ); }