deleteAtWithValue
import { deleteAtWithValue } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/record.ts";Remove the key from the ReadonlyRecord, returning a pair containing the new record and an Option containing the removed key value. If the record did not hold the specified key then this is a non-op and the return will be the original record and none.
@example
import * as R from "./record.ts";
import { pipe } from "./fn.ts";
const result1 = pipe(
{ one: 1, two: 2 },
R.deleteAtWithValue('one'),
); // [{ two: 2 }, Some(1)]
const result2 = pipe(
{ one: 1, two: 2 },
R.deleteAtWithValue('three'),
); // [{ one: 1, two: 2}, None]
function deleteAtWithValue(key: string): <A>(ua: ReadonlyRecord<A>) => Pair<ReadonlyRecord<A>, Option<A>>;
§
deleteAtWithValue(key: string): <A>(ua: ReadonlyRecord<A>) => Pair<ReadonlyRecord<A>, Option<A>>
[src]§Return Type
§
<A>(ua: ReadonlyRecord<A>) => Pair<ReadonlyRecord<A>, Option<A>>
[src]