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

13 lines (10 loc) 266 B
"use strict"; var isCallable = require("./object/is-callable"); module.exports = function (value) { try { if (value && isCallable(value.toString)) return value.toString(); return String(value); } catch (e) { return "<Non-coercible to string value>"; } };