UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 792 B
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import n from"./../assert/is-function.js";import r from"./../assert/is-nonnegative-integer-array.js";var e=n,t=r;function a(n,r,a){if(!e(n))throw new TypeError("invalid argument. First argument must be a function. Value: `"+n+"`.");if(!t(r))throw new TypeError("invalid argument. Second argument must be an array containing only nonnegative integers. Value: `"+r+"`.");return function(){var e,t,i;if((t=arguments.length)!==r.length)throw new Error("invalid invocation. Unexpected number of input arguments. Expected: "+r.length+". Actual: "+t+".");for(e=new Array(t),i=0;i<t;i++)e[i]=arguments[r[i]];return n.apply(a,e)}}var i=a;export default i; //# sourceMappingURL=reorder-arguments.js.map