scrubReservedKeys function

Map<String, Object?> scrubReservedKeys(
  1. Map<String, Object?> properties
)

Returns a new map with top-level namespaces and retired property keys removed. Retired property keys are removed at every map depth.

Implementation

Map<String, Object?> scrubReservedKeys(Map<String, Object?> properties) {
  final result = <String, Object?>{};
  for (final entry in properties.entries) {
    if (_isTopLevelReserved(entry.key)) continue;
    result[entry.key] = _scrubValue(entry.value);
  }
  return result;
}