# all files / TypeScript.NET/source/System/Collections/Enumeration/ ArrayEnumerator.js

83.33% Statements 25/30
64% Branches 16/25
100% Functions 7/7
91.3% Lines 21/23

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42

    1×
    1×
    1×
    1×

    1×
    1×
    1×

    1×
    1×
    1×
    1×
    1×
    276×
    276×
    276×
    274×
    274×

    1×

    1×
    1×
    1×

     /*!
     * @author electricessence / https://github.com/electricessence/
     * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md
     */
    var __extends = (this && this.__extends) || function (d, b) {
        for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
    (function (factory) {
        Eif (typeof module === 'object' && typeof module.exports === 'object') {
            var v = factory(require, exports); Iif (v !== undefined) module.exports = v;
        }
        else if (typeof define === 'function' && define.amd) {
            define(["require", "exports", "./IndexEnumerator", "../../Types"], factory);
        }
    })(function (require, exports) {
        "use strict";
        var IndexEnumerator_1 = require("./IndexEnumerator");
        var Types_1 = require("../../Types");
        var ArrayEnumerator = (function (_super) {
            __extends(ArrayEnumerator, _super);
            function ArrayEnumerator(arrayOrFactory, start, step) {
                if (start === void 0) { start = 0; }
                if (step === void 0) { step = 1; }
                _super.call(this, function () {
                    var array = Types_1.Type.isFunction(arrayOrFactory) ? arrayOrFactory() : arrayOrFactory;
                    return {
                        source: array,
                        pointer: start,
                        length: array ? array.length : 0,
                        step: step
                    };
                });
            }
            return ArrayEnumerator;
        }(IndexEnumerator_1.IndexEnumerator));
        exports.ArrayEnumerator = ArrayEnumerator;
        Object.defineProperty(exports, "__esModule", { value: true });
        exports.default = ArrayEnumerator;
    });
    //# sourceMappingURL=ArrayEnumerator.js.map