libram 0.11.20 → 0.11.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/session.js +2 -2
- package/package.json +1 -1
package/dist/session.js
CHANGED
|
@@ -194,10 +194,10 @@ export class Session {
|
|
|
194
194
|
toFile(filename) {
|
|
195
195
|
const val = {
|
|
196
196
|
meat: this.meat,
|
|
197
|
-
items: Object.fromEntries(this.items),
|
|
197
|
+
items: Object.fromEntries([...this.items.entries()].sort(([a], [b]) => a.id - b.id)),
|
|
198
198
|
totalTurns: this.totalTurns,
|
|
199
199
|
};
|
|
200
|
-
bufferToFile(JSON.stringify(val), Session.getFilepath(filename));
|
|
200
|
+
bufferToFile(JSON.stringify(val, null, 2), Session.getFilepath(filename));
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
203
|
* Import a session from a file in the data/ directory. Conventionally the file should end in ".json"
|