@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 1.26 kB
JavaScript
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
import r from"./../assert/is-array.js";import e from"./../assert/is-typed-array-like.js";import t from"./../assert/is-integer.js";import n from"./../array/buffer.js";import a from"./../math/base/special/ceil2.js";function f(r,e){var t;for(t=0;t<e.length;t++)r.push(e[t]);return r}function o(r,e){var t,n;for(t=r.length,n=0;n<e.length;n++)r[t+n]=e[n];return r.length=t+e.length,r}var i=n,s=a;function u(r,e){var t,n,a,f,o,u;if(n=r.length,f=e.length,t=n*r.BYTES_PER_ELEMENT+f*r.BYTES_PER_ELEMENT+r.byteOffset,r.buffer.byteLength<t)for(a=new i(s(t+1)),o=new r.constructor(a,0,n+f),u=0;u<n;u++)o[u]=r[u];else o=new r.constructor(r.buffer,r.byteOffset,n+f);for(u=0;u<f;u++)o[n+u]=e[u];return o}var l=r,h=e,g=t,m=f,y=o,p=u;function c(r){var e,t;for(e=new Array(arguments.length-1),t=0;t<arguments.length-1;t++)e[t]=arguments[t+1];if(l(r))return m(r,e);if(h(r))return p(r,e);if(null!==r&&"object"==typeof r&&"number"==typeof r.length&&g(r.length)&&r.length>=0)return y(r,e);throw new TypeError("invalid argument. First argument must be either an Array, Typed Array, or an array-like Object. Value: `"+r+"`.")}var b=c;export default b;
//# sourceMappingURL=push.js.map