code: function (ent) {
      if (ent.constructor.name === 'Array') {
        serializeArray()
      } else {
        profile.default[ent.constructor.name] = ent
      }
    }
docs: Separate this function into another utils library.