@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">
16 lines (11 loc) • 360 B
JavaScript
import _newArrowCheck from '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);
export default convertIfNot;