You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,9 @@ const MyEnum = Enum({
53
53
-`enums.filters`
54
54
-`enums.valuesEnum`
55
55
- Please use the new methods `Enum.items`, `Enum.toSelect`, `Enum.toMenu`, `Enum.toFilter`, and `Enum.toValueMap` instead, which are introduced since `v2.1.0`.
56
+
-`ENUM_COLLECTION` symbol is renamed to `IS_ENUM_COLLECTION`.
57
+
-`ENUM_ITEM` symbol is renamed to `IS_ENUM_ITEM`.
58
+
-`ENUM_ITEMS` symbol is renamed to `IS_ENUM_ITEMS`.
56
59
-`EnumValuesArray` interface is renamed to `EnumItemsArray`.
57
60
-`IEnumValues` interface is renamed to `IEnumItems`.
Copy file name to clipboardExpand all lines: enum-plus-v3.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,15 @@
8
8
-[x] Remove deprecated `enum.menus`
9
9
-[x] Remove deprecated `enum.filters`
10
10
-[x] Remove deprecated `enum.valuesEnum`
11
-
-[] Change the behavior of `enum.values`, now it returns an array of the member raw values. Use `enum.items` for the old behavior.
12
-
-[] Add `enum.labels` property, which returns an readonly array of the member labels.
11
+
-[x] Change the behavior of `enum.values`, now it returns an array of the member raw values. Use `enum.items` for the old behavior.
12
+
-[x] Add `enum.labels` property, which returns an readonly array of the member labels.
13
13
-[ ] Add `enum.find` method, which allows searching for enum items by specific field, including _meta_ fields (i.e. custom fields).
14
14
-[ ] Add `enum.meta` object to aggregate all custom fields defined in the enum. The keys are the field names, and values are the raw values of each field. It's a good way of accessing custom fields without iterating through the enum items.
15
15
-[x] Add `enum.toList`, method which is an alternative of `toSelect`、`toMenu`、`toFilter`. The latter methods are moving out of the core library and will be available as plugins.
16
16
-[ ] Add `enum.toMap` as an alternative of `enum.toValueMap`.
17
+
<!-- - [ ] 增加isEnum方法,为instanceof增加断言 -->
18
+
-[ ] Add `Enum.isEnum` method to check if an object is an instance of `Enum`.
19
+
-[ ] Add type assertion for `instanceof` check of EnumCollection.
17
20
-[x] Simplify the enum initialization that no longer requires `as const` assertion. _by @otomad_
18
21
-[x] Release the `UMD` module format of `enum-plus` in `umd` folder.
19
22
-[x] Reuse one copy of testing code for both `Jest` and `e2e` testing.
0 commit comments