UNPKG

@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">

18 lines (12 loc) 426 B
// @flow import isDeepEqual from "fast-deep-equal"; import {curry} from "flow-static-land/lib/Fun"; import getIn from "./getIn"; import type {Composite, Path} from "./types"; /** * Returns true if value located at given path is deeply equal to the one * specified. */ const hasIn = (path: Path, value: mixed, composite: Composite): boolean => isDeepEqual(getIn(path, composite), value); export default curry(hasIn);