scorm-again 3.1.0 → 3.1.1

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.
@@ -22306,19 +22306,13 @@ class Scorm2004DataSerializer {
22306
22306
  } else {
22307
22307
  delete cmiExport.cmi.total_time;
22308
22308
  }
22309
- const result = [];
22310
22309
  const flattened = flatten(cmiExport);
22311
22310
  const settings = this.context.getSettings();
22312
22311
  switch (settings.dataCommitFormat) {
22313
22312
  case "flattened":
22314
- return flatten(cmiExport);
22313
+ return flattened;
22315
22314
  case "params":
22316
- for (const item in flattened) {
22317
- if ({}.hasOwnProperty.call(flattened, item)) {
22318
- result.push(`${item}=${flattened[item]}`);
22319
- }
22320
- }
22321
- return result;
22315
+ return Object.entries(flattened).map(([item, value]) => `${item}=${value}`);
22322
22316
  case "json":
22323
22317
  default:
22324
22318
  return cmiExport;