@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">
20 lines (13 loc) • 513 B
JavaScript
;
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _newArrowCheck = _interopDefault(require('babel-runtime/helpers/newArrowCheck'));
var _this = undefined;
/**
* Returns input if it is an Array or returns a new Array with input inside if
* it is not.
*/
var convertIfNot = function (input) {
_newArrowCheck(this, _this);
return Array.isArray(input) ? input : [input];
}.bind(undefined);
module.exports = convertIfNot;