jsify function

dynamic jsify(
  1. Object? object
)

Recursively converts a JSON-like collection to JavaScript compatible representation.

WARNING: performance of this method is much worse than other util methods in this library. Only use this method as a last resort. Prefer instead to use @anonymous @JS() annotated classes to create map-like objects for JS interop.

If the argument are a Map or Iterable, then they will be deeply converted. Maps are converted into JavaScript objects. Iterables are converted into arrays. @JS() annotated objects are passed through unmodified. Dart objects are also passed through unmodified, but their members aren't usable from JavaScript. The conversion logic for primitives(numbers, bools, and Strings) is backend specific.

Implementation

external dynamic jsify(Object? object);