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

10 lines (7 loc) 269 B
"use strict"; var toShortString = require("../to-short-string-representation") , isInteger = require("./is-integer"); module.exports = function (num) { if (!isInteger(num)) throw new TypeError(toShortString(num) + " is not a integer"); return Number(num); };