@@ -62,16 +62,16 @@ export default (
62
62
/* Functions */
63
63
/* -------------------------------------------------------------------------- */
64
64
65
- function getLeaves (
65
+ const getLeaves = (
66
66
siblings : { configurable ?: boolean ; value : Record < string , unknown > [ ] } ,
67
67
parent : {
68
68
configurable ?: boolean ;
69
69
value ?: Record < string , unknown > | undefined ;
70
70
} = { } ,
71
- ) : Record < string , unknown > [ ] {
72
- function defineProperties (
71
+ ) : Record < string , unknown > [ ] => {
72
+ const defineProperties = (
73
73
value : Record < string , unknown > ,
74
- ) : Record < string , unknown > [ ] {
74
+ ) : Record < string , unknown > [ ] => {
75
75
Object . defineProperties ( value , {
76
76
...properties ,
77
77
[ keyParent ] : parent ,
@@ -87,9 +87,9 @@ export default (
87
87
{ configurable, value } ,
88
88
) ,
89
89
] ;
90
- }
90
+ } ;
91
91
return siblings . value . flatMap ( defineProperties ) ;
92
- }
92
+ } ;
93
93
94
94
/* -------------------------------------------------------------------------- */
95
95
/* Reactives */
@@ -111,7 +111,7 @@ export default (
111
111
/* Functions */
112
112
/* -------------------------------------------------------------------------- */
113
113
114
- function add ( pId : string ) : string | undefined {
114
+ const add = ( pId : string ) : string | undefined => {
115
115
const the : Record < string , unknown > | undefined = leaves . value . find (
116
116
( leaf ) => leaf [ keyId ] === pId ,
117
117
) ;
@@ -136,11 +136,11 @@ export default (
136
136
return id ;
137
137
}
138
138
return undefined ;
139
- }
139
+ } ;
140
140
141
141
/* -------------------------------------------------------------------------- */
142
142
143
- function down ( pId : string ) : void {
143
+ const down = ( pId : string ) : void => {
144
144
const the : Record < string , unknown > | undefined = leaves . value . find (
145
145
( leaf ) => leaf [ keyId ] === pId ,
146
146
) ;
@@ -157,11 +157,11 @@ export default (
157
157
siblings [ index ] ,
158
158
] ;
159
159
}
160
- }
160
+ } ;
161
161
162
162
/* -------------------------------------------------------------------------- */
163
163
164
- function left ( pId : string ) : string | undefined {
164
+ const left = ( pId : string ) : string | undefined => {
165
165
const the : Record < string , unknown > | undefined = leaves . value . find (
166
166
( leaf ) => leaf [ keyId ] === pId ,
167
167
) ;
@@ -182,11 +182,11 @@ export default (
182
182
}
183
183
}
184
184
return undefined ;
185
- }
185
+ } ;
186
186
187
187
/* -------------------------------------------------------------------------- */
188
188
189
- function remove ( pId : string ) : string | undefined {
189
+ const remove = ( pId : string ) : string | undefined => {
190
190
const the : Record < string , unknown > | undefined = leaves . value . find (
191
191
( leaf ) => leaf [ keyId ] === pId ,
192
192
) ;
@@ -215,11 +215,11 @@ export default (
215
215
}
216
216
}
217
217
return undefined ;
218
- }
218
+ } ;
219
219
220
220
/* -------------------------------------------------------------------------- */
221
221
222
- function right ( pId : string ) : string | undefined {
222
+ const right = ( pId : string ) : string | undefined => {
223
223
const the : Record < string , unknown > | undefined = leaves . value . find (
224
224
( leaf ) => leaf [ keyId ] === pId ,
225
225
) ;
@@ -239,11 +239,11 @@ export default (
239
239
}
240
240
}
241
241
return undefined ;
242
- }
242
+ } ;
243
243
244
244
/* -------------------------------------------------------------------------- */
245
245
246
- function up ( pId : string ) : void {
246
+ const up = ( pId : string ) : void => {
247
247
const the : Record < string , unknown > | undefined = leaves . value . find (
248
248
( leaf ) => leaf [ keyId ] === pId ,
249
249
) ;
@@ -260,7 +260,7 @@ export default (
260
260
siblings [ prevIndex ] ,
261
261
] ;
262
262
}
263
- }
263
+ } ;
264
264
265
265
/* -------------------------------------------------------------------------- */
266
266
/* Main */
0 commit comments