@extra-array/copy-within.min
Version:
Copies part of array within.
1 lines • 1.14 kB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).array_copyWithin=e()}}(function(){return function(){return function e(n,t,r){function o(f,u){if(!t[f]){if(!n[f]){var c="function"==typeof require&&require;if(!u&&c)return c(f,!0);if(i)return i(f,!0);var l=new Error("Cannot find module '"+f+"'");throw l.code="MODULE_NOT_FOUND",l}var a=t[f]={exports:{}};n[f][0].call(a.exports,function(e){return o(n[f][1][e]||e)},a,a.exports,e,n,t,r)}return t[f].exports}for(var i="function"==typeof require&&require,f=0;f<r.length;f++)o(r[f]);return o}}()({1:[function(e,n,t){"use strict";function r(e,n=0){return n<0?Math.max(e.length+n,0):Math.min(n,e.length)}function o(e,n=0,t=e.length){var[n,t]=function(e,n=0,t=e.length){return[n=r(e,n),t=Math.max(n,r(e,t))]}(e,n,t);return t-n}n.exports=function(e,n=0,t=0,r=e.length){r=t+Math.min(o(e,t,r),o(e,n));var i=e.slice(0,n),f=e.slice(t,r),u=e.slice(n+f.length);return i.concat(f,u)}},{}]},{},[1])(1)});