/
githubmirror
/
immutable-js
Обзор
Документация
Войти
/
githubmirror
/
immutable-js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v5.1.3
src/functional/removeIn.ts
18 строк
601 B
Julien Deniau
Remove runkit
24 май 2025, 01:13
24 май 2025, 01:13
2b47de5
Код
Авторство
О чём код?
import { updateIn, type PossibleCollection } from './updateIn'; import { NOT_SET } from '../TrieUtils'; import type { KeyPath } from '../../type-definitions/immutable'; /** * Returns a copy of the collection with the value at the key path removed. * * A functional alternative to `collection.removeIn(keypath)` which will also * work with plain Objects and Arrays. */ export function removeIn< K extends PropertyKey, V, TProps extends object, C extends PossibleCollection<K, V, TProps>, >(collection: C, keyPath: KeyPath<K>): C { return updateIn(collection, keyPath, () => NOT_SET); }