@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">
24 lines (16 loc) • 827 B
JavaScript
;
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _toConsumableArray = _interopDefault(require('babel-runtime/helpers/toConsumableArray'));
var _newArrowCheck = _interopDefault(require('babel-runtime/helpers/newArrowCheck'));
var Fun = require('flow-static-land/lib/Fun');
var _this = undefined;
/**
* Returns a new Array with the result of having replaced the elements at the
* given index with the ones specified.
*/
var replace = function (index, elements, array) {
_newArrowCheck(this, _this);
return [].concat(_toConsumableArray(array.slice(0, index)), _toConsumableArray(elements), _toConsumableArray(array.slice(index + elements.length)));
}.bind(undefined);
var replace$1 = Fun.curry(replace);
module.exports = replace$1;