File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ <!--
2+ A new scriv changelog fragment.
3+
4+ Uncomment the section that is right (remove the HTML comment wrapper).
5+ For top level release notes, leave all the headers commented out.
6+ -->
7+
8+ ### Added
9+
10+ - Add support for the ` unique() ` function in schema expressions.
11+
12+ <!--
13+ ### Changed
14+
15+ - A bullet item for the Changed category.
16+
17+ -->
18+ <!--
19+ ### Fixed
20+
21+ - A bullet item for the Fixed category.
22+
23+ -->
24+ <!--
25+ ### Deprecated
26+
27+ - A bullet item for the Deprecated category.
28+
29+ -->
30+ <!--
31+ ### Removed
32+
33+ - A bullet item for the Removed category.
34+
35+ -->
36+ <!--
37+ ### Security
38+
39+ - A bullet item for the Security category.
40+
41+ -->
42+ <!--
43+ ### Infrastructure
44+
45+ - A bullet item for the Infrastructure category.
46+
47+ -->
Original file line number Diff line number Diff line change @@ -90,6 +90,12 @@ export const expressionFunctions = {
9090 }
9191 return null
9292 } ,
93+ unique : < T > ( list : T [ ] ) : T [ ] | null => {
94+ if ( list !== null ) {
95+ return [ ...new Set ( list ) ]
96+ }
97+ return null
98+ } ,
9399 count : < T > ( list : T [ ] , val : T ) : number => {
94100 return list . filter ( ( x ) => x === val ) . length
95101 } ,
You can’t perform that action at this time.
0 commit comments