UNPKG

@stdlib/esm

Version:

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

3 lines 1.08 kB
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import e from"./../utils/define-nonenumerable-read-only-property.js";import r from"./../assert/is-number.js";import n from"./../math/base/assert/is-nan.js";import t from"./../assert/is-nonnegative-integer.js";import i from"./../symbol/iterator.js";var o=e,a=r.isPrimitive,u=n,m=t.isPrimitive,s=i,l=1e308;function f(e,r,n){var t,i,d,g;if(!a(e)||u(e))throw new TypeError("invalid argument. First argument must be a number. Value: `"+e+"`.");if(!a(r)||u(r))throw new TypeError("invalid argument. Second argument must be a number. Value: `"+r+"`.");if(arguments.length>2){if(!m(n))throw new TypeError("invalid argument. Third argument must be a nonnegative integer. Value: `"+n+"`.");d=n}else d=l;return g=-1,o(t={},"next",v),o(t,"return",p),s&&o(t,s,b),t;function v(){return g+=1,i||g>=d?{done:!0}:{value:e+g*r,done:!1}}function p(e){return i=!0,arguments.length?{value:e,done:!0}:{done:!0}}function b(){return f(e,r,d)}}var d=f;export default d; //# sourceMappingURL=step.js.map