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: enum-plus-v3.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# enum-plus v3.0 - A Major Update
2
2
3
+
### ■■■■■■■■■■■■■■■■■■□□ (90%)
4
+
3
5
## Features
4
6
5
7
### Codebase
@@ -8,14 +10,18 @@
8
10
-[x] Remove deprecated `enum.menus`
9
11
-[x] Remove deprecated `enum.filters`
10
12
-[x] Remove deprecated `enum.valuesEnum`
13
+
-[x] The following symbols have been renamed to better reflect their purpose:
14
+
-`ENUM_COLLECTION` is now `IS_ENUM`
15
+
-`ENUM_ITEM` is now `IS_ENUM_ITEM`
16
+
-`ENUM_ITEMS` is now `IS_ENUM_ITEMS`
11
17
-[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
18
-[x] Add `enum.labels` property, which returns an readonly array of the member labels.
13
-
-[] Add `enum.find` method, which allows searching for enum items by specific field, including _meta_ fields (i.e. custom fields).
19
+
-[x] Add `enum.findBy` method, which allows searching for enum items by built-in fields, and the custom _meta_fields.
14
20
-[ ] 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
21
-[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
22
-[ ] Add `enum.toMap` as an alternative of `enum.toValueMap`.
17
23
-[x] Add `Enum.isEnum` method to check if an object is an instance of `Enum`.
18
-
-[] Add type assertion for `instanceof` check of EnumCollection.
24
+
-[x] Add type assertion for `instanceof` check of EnumCollection.
19
25
-[x] Simplify the enum initialization that no longer requires `as const` assertion. _by @otomad_
20
26
-[x] Release the `UMD` module format of `enum-plus` in `umd` folder.
21
27
-[x] Reuse one copy of testing code for both `Jest` and `e2e` testing.
0 commit comments