@@ -83,13 +83,13 @@ export default (
83
83
/* Functions */
84
84
/* -------------------------------------------------------------------------- */
85
85
86
- function getLeaves (
86
+ const getLeaves = (
87
87
siblings : { configurable ?: boolean ; value : Record < string , unknown > [ ] } ,
88
88
parent : {
89
89
configurable ?: boolean ;
90
90
value : null | Record < string , unknown > ;
91
91
} = { value : null } ,
92
- ) : Record < string , unknown > [ ] {
92
+ ) : Record < string , unknown > [ ] => {
93
93
return siblings . value . flatMap ( ( value ) => {
94
94
Object . defineProperties ( value , {
95
95
...properties ,
@@ -107,7 +107,7 @@ export default (
107
107
) ,
108
108
] ;
109
109
} ) ;
110
- }
110
+ } ;
111
111
112
112
/* -------------------------------------------------------------------------- */
113
113
/* Reactives */
@@ -121,9 +121,9 @@ export default (
121
121
/* Functions */
122
122
/* -------------------------------------------------------------------------- */
123
123
124
- function startLeaves ( ) : Record < string , unknown > [ ] {
124
+ const startLeaves = ( ) : Record < string , unknown > [ ] => {
125
125
return getLeaves ( { value } ) ;
126
- }
126
+ } ;
127
127
128
128
/* -------------------------------------------------------------------------- */
129
129
/* Computations */
@@ -135,7 +135,7 @@ export default (
135
135
/* Functions */
136
136
/* -------------------------------------------------------------------------- */
137
137
138
- function add ( pId : string ) : null | string {
138
+ const add = ( pId : string ) : null | string => {
139
139
const the : null | Record < string , unknown > =
140
140
leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ?? null ;
141
141
if ( the ) {
@@ -159,11 +159,11 @@ export default (
159
159
return id ;
160
160
}
161
161
return null ;
162
- }
162
+ } ;
163
163
164
164
/* -------------------------------------------------------------------------- */
165
165
166
- function down ( pId : string ) : void {
166
+ const down = ( pId : string ) : void => {
167
167
const the : null | Record < string , unknown > =
168
168
leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ?? null ;
169
169
if ( the ) {
@@ -179,11 +179,11 @@ export default (
179
179
siblings [ index ] ,
180
180
] ;
181
181
}
182
- }
182
+ } ;
183
183
184
184
/* -------------------------------------------------------------------------- */
185
185
186
- function left ( pId : string ) : null | string {
186
+ const left = ( pId : string ) : null | string => {
187
187
const the : null | Record < string , unknown > =
188
188
leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ?? null ;
189
189
if ( the ) {
@@ -203,11 +203,11 @@ export default (
203
203
}
204
204
}
205
205
return null ;
206
- }
206
+ } ;
207
207
208
208
/* -------------------------------------------------------------------------- */
209
209
210
- function remove ( pId : string ) : null | string {
210
+ const remove = ( pId : string ) : null | string => {
211
211
const the : null | Record < string , unknown > =
212
212
leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ?? null ;
213
213
if ( the ) {
@@ -235,11 +235,11 @@ export default (
235
235
}
236
236
}
237
237
return null ;
238
- }
238
+ } ;
239
239
240
240
/* -------------------------------------------------------------------------- */
241
241
242
- function right ( pId : string ) : null | string {
242
+ const right = ( pId : string ) : null | string => {
243
243
const the : null | Record < string , unknown > =
244
244
leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ?? null ;
245
245
if ( the ) {
@@ -258,11 +258,11 @@ export default (
258
258
}
259
259
}
260
260
return null ;
261
- }
261
+ } ;
262
262
263
263
/* -------------------------------------------------------------------------- */
264
264
265
- function up ( pId : string ) : void {
265
+ const up = ( pId : string ) : void => {
266
266
const the : null | Record < string , unknown > =
267
267
leaves . value . find ( ( leaf ) => leaf [ keyId ] === pId ) ?? null ;
268
268
if ( the ) {
@@ -278,7 +278,7 @@ export default (
278
278
siblings [ prevIndex ] ,
279
279
] ;
280
280
}
281
- }
281
+ } ;
282
282
283
283
/* -------------------------------------------------------------------------- */
284
284
/* Main */
0 commit comments