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

26 lines (17 loc) 726 B
'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var _Number$isInteger = _interopDefault(require('babel-runtime/core-js/number/is-integer')); var _newArrowCheck = _interopDefault(require('babel-runtime/helpers/newArrowCheck')); var _this = undefined; var isIntGreaterThan = function (number, other) { _newArrowCheck(this, _this); return _Number$isInteger(number) && number >= other; }.bind(undefined); /** * Returns true if the given string is an Array key or false otherwise. */ var isKey = function (string) { _newArrowCheck(this, _this); return isIntGreaterThan(Number(string), 0); }.bind(undefined); module.exports = isKey;