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 const isIntGreaterThan = (number, other) => Number.isInteger(number) && number >= other; /** * Returns true if the given string is an Array key or false otherwise. */ const isKey = (string: string): boolean => isIntGreaterThan(Number(string), 0); export default isKey;