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

12 lines (8 loc) 285 B
// @flow import type {Composite} from "./types"; /** * Returns a new composite with the same own enumerable props of the one given. */ const shallowCopy = <C: Composite>(composite: C): C => Array.isArray(composite) ? [...composite] : {...composite}; export default shallowCopy;