fmt function

String fmt(
  1. Object? v
)

The engine's fmt(v): strings as they are, everything else as JSON (undefined prints as such).

Implementation

String fmt(Object? v) => v is String ? v : (jsStringify(v) ?? 'undefined');