(options)
| 224 | } |
| 225 | |
| 226 | toObject(options) { |
| 227 | if (options?.flattenMaps) { |
| 228 | const ret = {}; |
| 229 | const keys = this.keys(); |
| 230 | for (const key of keys) { |
| 231 | ret[key] = clone(this.get(key), options); |
| 232 | } |
| 233 | return ret; |
| 234 | } |
| 235 | |
| 236 | return new Map(this); |
| 237 | } |
| 238 | |
| 239 | $toObject() { |
| 240 | return this.constructor.prototype.toObject.apply(this, arguments); |