/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/core-data/src/utils/is-numeric-id.js
10 строк
346 B
Dave Smith
Fix resolver resolution status key types mismatch causing unwanted resolver calls for identical state data (#52120)
16 окт 2023, 20:00
Не верифицирован
16 окт 2023, 20:00
2155576
Код
Авторство
О чём код?
/** * Checks argument to determine if it's a numeric ID. * For example, '123' is a numeric ID, but '123abc' is not. * * @param {any} id the argument to determine if it's a numeric ID. * @return {boolean} true if the string is a numeric ID, false otherwise. */ export default function isNumericID( id ) { return /^\s*\d+\s*$/.test( id ); }