/
githubmirror
/
immutable-js
Обзор
Документация
Войти
/
githubmirror
/
immutable-js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
website/docs/hasIn().mdx
13 строк
493 B
Julien Deniau
Doc as mdx instead of export from .d.ts file (#2104)
24 май 2025, 00:47
Не верифицирован
24 май 2025, 00:47
21de701
Код
Авторство
О чём код?
import Repl from '@/repl/Repl.tsx'; import CodeLink from '@/mdx-components/CodeLink.tsx'; # hasIn() Returns true if the key path is defined in the provided collection. A functional alternative to `collection.hasIn(keypath)` which will also work with plain Objects and Arrays. <Signature code={`hasIn(collection, keyPath): boolean;`} /> <Repl defaultValue={`hasIn({ x: { y: { z: 123 } } }, ['x', 'y', 'z']);`} /> <Repl defaultValue={`hasIn({ x: { y: { z: 123 } } }, ['x', 'q', 'p']);`} />