@@ -128,7 +128,7 @@ import {
128128 objFreeze ,
129129 objHas ,
130130 objIsEmpty ,
131- objToArray ,
131+ objMap ,
132132 objValidate ,
133133} from '../common/obj.ts' ;
134134import { defaultSorter } from '../common/index.ts' ;
@@ -1131,7 +1131,7 @@ export const createStore: typeof createStoreDecl = (): Store => {
11311131 ( tableId , rowId ) => {
11321132 if ( validateRow ( tableId , rowId , partialRow , 1 ) ) {
11331133 const table = getOrCreateTable ( tableId ) ;
1134- objToArray ( partialRow , ( cell , cellId ) =>
1134+ objMap ( partialRow , ( cell , cellId ) =>
11351135 setCellIntoDefaultRow ( tableId , table , rowId , cellId , cell as Cell ) ,
11361136 ) ;
11371137 }
@@ -1177,7 +1177,7 @@ export const createStore: typeof createStoreDecl = (): Store => {
11771177 const setPartialValues = ( partialValues : Values ) : Store =>
11781178 fluentTransaction ( ( ) =>
11791179 validateValues ( partialValues , 1 )
1180- ? objToArray ( partialValues , ( value , valueId ) =>
1180+ ? objMap ( partialValues , ( value , valueId ) =>
11811181 setValidValue ( valueId , value as Value ) ,
11821182 )
11831183 : 0 ,
@@ -1198,13 +1198,13 @@ export const createStore: typeof createStoreDecl = (): Store => {
11981198
11991199 const applyChanges = ( changes : Changes ) : Store =>
12001200 fluentTransaction ( ( ) => {
1201- objToArray ( changes [ 0 ] , ( table , tableId ) =>
1201+ objMap ( changes [ 0 ] , ( table , tableId ) =>
12021202 isUndefined ( table )
12031203 ? delTable ( tableId )
1204- : objToArray ( table , ( row , rowId ) =>
1204+ : objMap ( table , ( row , rowId ) =>
12051205 isUndefined ( row )
12061206 ? delRow ( tableId , rowId )
1207- : objToArray ( row , ( cell , cellId ) =>
1207+ : objMap ( row , ( cell , cellId ) =>
12081208 setOrDelCell (
12091209 store ,
12101210 tableId ,
@@ -1215,7 +1215,7 @@ export const createStore: typeof createStoreDecl = (): Store => {
12151215 ) ,
12161216 ) ,
12171217 ) ;
1218- objToArray ( changes [ 1 ] , ( value , valueId ) =>
1218+ objMap ( changes [ 1 ] , ( value , valueId ) =>
12191219 setOrDelValue ( store , valueId , value as ValueOrUndefined ) ,
12201220 ) ;
12211221 } ) ;
@@ -1716,7 +1716,7 @@ export const createStore: typeof createStoreDecl = (): Store => {
17161716 } ;
17171717
17181718 // and now for some gentle meta-programming
1719- objToArray (
1719+ objMap (
17201720 {
17211721 [ HAS + TABLES ] : [ 0 , hasTablesListeners , [ ] , ( ) => [ hasTables ( ) ] ] ,
17221722 [ TABLES ] : [ 0 , tablesListeners ] ,
0 commit comments