Files

27 lines
628 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Darklord.js — normalizeState() (satır 144)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function normalizeState(state)
{
var out = defaultState();
if (!state) return out;
try { out.version = Number(state.version) || 1; } catch (e1) {}
try { out.updatedAt = Number(state.updatedAt) || 0; } catch (e2) {}
for (var i = 0; i < MEMBERS.length; i++)
{
var id = MEMBERS[i].id;
try
{
if (state.eyes && state.eyes[id]) out.eyes[id] = state.eyes[id];
}
catch (e3) {}
}
return out;
}
```