mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
All 0.28.0 Changes - Bitnodes 4 and 11 and webpack migration
This commit is contained in:
@@ -17,13 +17,13 @@ function Reviver(key, value) {
|
||||
ctor = Reviver.constructors[value.ctor] || window[value.ctor];
|
||||
if (typeof ctor === "function" &&
|
||||
typeof ctor.fromJSON === "function") {
|
||||
|
||||
|
||||
return ctor.fromJSON(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
Reviver.constructors = {}; // A list of constructors the smart reviver should know about
|
||||
Reviver.constructors = {}; // A list of constructors the smart reviver should know about
|
||||
|
||||
// A generic "toJSON" function that creates the data expected
|
||||
// by Reviver.
|
||||
@@ -67,3 +67,5 @@ function Generic_fromJSON(ctor, data) {
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
export {Reviver, Generic_toJSON, Generic_fromJSON};
|
||||
|
||||
Reference in New Issue
Block a user