Skip to content

v2.3.0

Choose a tag to compare

@shijistar shijistar released this 23 May 08:52

Features

  • ✨ Export new symbols ENUM_ITEMENUM_ITEMS and ENUM_COLLECTION which are used to access some special internal properties.
  • ✨ Add [ENUM_COLLECTION]: true to the Enum class, which is used to indicates that this is as an enum collection.
  • ✨ Add [ENUM_ITEM]: true to the EnumItem class, which is used to indicates that this is as an enum item.
  • ✨ Add [ENUM_ITEMS]: true to Enum.items array, which is used to indicates that this is as an enum items array.

Notable Changes

  • 💣 Remove [Symbol.toStringTag]: "EnumItem" from EnumItem class. The result of Object.prototype.toString.call(enumItem) is changed from [object EnumItem] back to [object Object]. If you are relying on this, please use enumItem[ENUM_ITEM] === true instead.
  • 💣 Remove [Symbol.toStringTag]: "EnumCollection" from Enum class. The result of Object.prototype.toString.call(enum) is changed from [object EnumCollection] to [object Array]. If you are relying on this, please use enum[ENUM_COLLECTION] === true instead.