@stdlib/esm
Version:
ES module distribution for Stdlib, a standard library for JavaScript and Node.js.
3 lines • 955 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"./../utils/define-nonenumerable-read-only-property.js";import e from"./../assert/is-number.js";import n from"./../math/base/assert/is-nan.js";import t from"./../symbol/iterator.js";import o from"./../constants/math/float64-pinf.js";var a=r,i=e.isPrimitive,u=n,m=t,s=o;function f(r,e){var n,t,o,l;if(!i(r)||u(r))throw new TypeError("invalid argument. First argument must be a number. Value: `"+r+"`.");if(arguments.length>1){if(!i(e)||u(e))throw new TypeError("invalid argument. Second argument must be a number. Value: `"+e+"`.");n=e}else n=s;return o=r-1,a(t={},"next",d),a(t,"return",p),m&&a(t,m,b),t;function d(){return l?{done:!0}:(o+=1)>n?(l=!0,{done:!0}):{value:o,done:!1}}function p(r){return l=!0,arguments.length?{value:r,done:!0}:{done:!0}}function b(){return f(r,n)}}var l=f;export default l;
//# sourceMappingURL=unitspace.js.map