sanitize static method

Object sanitize(
  1. dynamic input
)

Implementation

static Object sanitize(dynamic input) {
  if (input is String || input is num || input is bool || input is DateTime) {
    return input as Object;
  }
  if (input is Iterable) {
    return [
      for (var item in input) sanitize(item),
    ];
  }
  if (input is Map<String, dynamic>) {
    return sanitizeParams(input);
  }
  _log.info("Don't know how to handle ${input.runtimeType} so we're toString()-ing it");
  return "$input";
}