@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">
15 lines (10 loc) • 354 B
Flow
// @flow
import {curry} from "flow-static-land/lib/Fun";
import type {Composite, Key} from "./types";
/**
* Returns true if key is included in composite's own enumerable ones,
* or false otherwise.
*/
const hasKey = (key: Key, composite: Composite): boolean =>
Object.prototype.hasOwnProperty.call(composite, key);
export default curry(hasKey);