5
5
recipeManager ,
6
6
runtime ,
7
7
} from "@commontools/runner" ;
8
- import { isObj } from "@commontools/utils" ;
8
+ import { isObject } from "@commontools/utils/types " ;
9
9
import {
10
10
createJsonSchema ,
11
11
JSONSchema ,
@@ -215,7 +215,7 @@ export function scrub(data: any): any {
215
215
// If there are properties, remove $UI and $NAME and any streams
216
216
const scrubbed = Object . fromEntries (
217
217
Object . entries ( data . schema . properties ) . filter ( ( [ key , value ] ) =>
218
- ! key . startsWith ( "$" ) && ( ! isObj ( value ) || ! value . asStream )
218
+ ! key . startsWith ( "$" ) && ( ! isObject ( value ) || ! value . asStream )
219
219
) ,
220
220
) ;
221
221
console . log ( "scrubbed modified schema" , scrubbed , data . schema ) ;
@@ -227,7 +227,7 @@ export function scrub(data: any): any {
227
227
) ;
228
228
} else {
229
229
const value = data . asSchema ( ) . get ( ) ;
230
- if ( isObj ( value ) ) {
230
+ if ( isObject ( value ) ) {
231
231
// Generate a new schema for all properties except $UI and $NAME and streams
232
232
const scrubbed = {
233
233
type : "object" ,
@@ -248,7 +248,7 @@ export function scrub(data: any): any {
248
248
}
249
249
} else if ( Array . isArray ( data ) ) {
250
250
return data . map ( ( value ) => scrub ( value ) ) ;
251
- } else if ( isObj ( data ) ) {
251
+ } else if ( isObject ( data ) ) {
252
252
return Object . fromEntries (
253
253
Object . entries ( data ) . map ( ( [ key , value ] ) => [ key , scrub ( value ) ] ) ,
254
254
) ;
@@ -264,7 +264,7 @@ function turnCellsIntoAliases(data: any): any {
264
264
return { $alias : data . getAsCellLink ( ) } ;
265
265
} else if ( Array . isArray ( data ) ) {
266
266
return data . map ( ( value ) => turnCellsIntoAliases ( value ) ) ;
267
- } else if ( isObj ( data ) ) {
267
+ } else if ( isObject ( data ) ) {
268
268
return Object . fromEntries (
269
269
Object . entries ( data ) . map ( (
270
270
[ key , value ] ,
0 commit comments