@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 (14 loc) • 621 B
JavaScript
import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';
import _newArrowCheck from 'babel-runtime/helpers/newArrowCheck';
import { curry } from 'flow-static-land/lib/Fun';
var _this = undefined;
/**
* Returns a new Array with the result of having inserted the given elements at
* the specified index.
*/
var insert = function (index, elements, array) {
_newArrowCheck(this, _this);
return [].concat(_toConsumableArray(array.slice(0, index)), _toConsumableArray(elements), _toConsumableArray(array.slice(index + 1)));
}.bind(undefined);
var insert$1 = curry(insert);
export default insert$1;