@dillonkearns/elm-graphql
Version:
<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">
22 lines (15 loc) • 522 B
Flow
// @flow
import {curry} from "flow-static-land/lib/Fun";
import updateIn from "./updateIn";
import type {Composite, Path} from "./types";
const remove = () => updateIn.remove;
/**
* Returns a new composite with the result of having removed the property
* located at the given path.
*
* (This does the same as calling **updateIn** with updater:
* `() => updateIn.remove`)
*/
const removeIn = (path: Path, composite: Composite): Composite =>
updateIn(path, remove, composite);
export default curry(removeIn);