mirror of
https://github.com/Krafpy/KSP-MGA-Planner.git
synced 2025-12-31 15:06:49 -08:00
22 lines
562 B
JavaScript
22 lines
562 B
JavaScript
"use strict";
|
|
var Utils;
|
|
(function (Utils) {
|
|
function hasNaN(obj) {
|
|
const stack = [obj];
|
|
while (stack.length > 0) {
|
|
const item = stack.pop();
|
|
for (const value of Object.values(item)) {
|
|
if (typeof value == "object") {
|
|
stack.push(value);
|
|
}
|
|
else if (typeof value == "number" && isNaN(value)) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
Utils.hasNaN = hasNaN;
|
|
})(Utils || (Utils = {}));
|
|
;
|