@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 826 B
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";function n(r){var e,t;return 0===r.length?[r,void 0]:(t=r[e=r.length-1],delete r[e],r.length=e,[r,t])}function a(r){var e,t;return 0===r.length?[r,void 0]:(t=r[e=r.length-1],[new r.constructor(r.buffer,r.byteOffset,e),t])}var o=r,i=e,f=t,l=n,u=a;function s(r){var e;if(o(r))return e=r.pop(),[r,e];if(i(r))return u(r);if(null!==r&&"object"==typeof r&&"number"==typeof r.length&&f(r.length)&&r.length>=0)return l(r);throw new TypeError("invalid argument. Must provide either an Array, Typed Array, or an array-like Object. Value: `"+r+"`.")}var p=s;export default p;
//# sourceMappingURL=pop.js.map