diff --git a/key/key.ts b/key/key.ts index 9fccf138d7c..92d1e4e658c 100644 --- a/key/key.ts +++ b/key/key.ts @@ -6,12 +6,14 @@ namespace $ { export function $mol_key< Value >( value : Value ) : string { if( typeof value === 'bigint' ) return value.toString() + 'n' + if( typeof value === 'symbol' ) return value.description! if( !value ) return JSON.stringify( value ) if( typeof value !== 'object' && typeof value !== 'function' ) return JSON.stringify( value ) return JSON.stringify( value, ( field, value )=> { if( typeof value === 'bigint' ) return value.toString() + 'n' + if( typeof value === 'symbol' ) return value.description if( !value ) return value if( typeof value !== 'object' && typeof value !== 'function' ) return value if( Array.isArray( value ) ) return value