igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
85 lines (84 loc) • 3.35 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __generator, __values } from "tslib";
import { Base, IEnumerable$1_$type, fromEnum, toEnum, Number_$type, markType, getEnumerator } from "igniteui-angular-core";
import { isInfinity, isNaN_ } from "igniteui-angular-core";
/**
* @hidden
*/
var SafeEnumerable = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SafeEnumerable, _super);
function SafeEnumerable(a) {
var _this = _super.call(this) || this;
_this.a = null;
_this.a = a;
return _this;
}
SafeEnumerable.prototype.c = function (a) {
if (isInfinity(a) || isNaN_(a)) {
return 0;
}
return a;
};
SafeEnumerable.prototype._b = function () {
var _a, _c, a, e_1_1;
var e_1, _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
if (this.a == null) {
return [2 /*return*/, undefined];
}
_e.label = 1;
case 1:
_e.trys.push([1, 6, 7, 8]);
_a = __values(fromEnum(this.a)), _c = _a.next();
_e.label = 2;
case 2:
if (!!_c.done)
return [3 /*break*/, 5];
a = _c.value;
return [4 /*yield*/, this.c(a)];
case 3:
_e.sent();
_e.label = 4;
case 4:
_c = _a.next();
return [3 /*break*/, 2];
case 5: return [3 /*break*/, 8];
case 6:
e_1_1 = _e.sent();
e_1 = { error: e_1_1 };
return [3 /*break*/, 8];
case 7:
try {
if (_c && !_c.done && (_d = _a.return))
_d.call(_a);
}
finally {
if (e_1)
throw e_1.error;
}
return [7 /*endfinally*/];
case 8: return [2 /*return*/];
}
});
};
SafeEnumerable.prototype.b = function () {
var _this = this;
return toEnum(function () { return _this._b(); });
};
SafeEnumerable.prototype.getEnumerator = function () {
return getEnumerator(this.b());
};
SafeEnumerable.prototype.getEnumeratorObject = function () {
return this.getEnumerator();
};
SafeEnumerable.$t = markType(SafeEnumerable, 'SafeEnumerable', Base.$, [IEnumerable$1_$type.specialize(Number_$type)]);
return SafeEnumerable;
}(Base));
export { SafeEnumerable };