Encoder typedef

Encoder = String Function(dynamic value, {Encoding? charset, Format? format})

Encoders, sorters, and the immutable EncodeOptions used by qs_dart.

These hooks mirror the original Node.js qs library. Defaults are chosen to match the reference implementation so round‑trips are consistent across ports. Function hook used to percent‑encode a single scalar value. Must return an already percent‑encoded token (without delimiters). Ignored when EncodeOptions.encode is false.

Implementation

/// Function hook used to percent‑encode a single scalar value.
/// Must return an already percent‑encoded token (without delimiters).
/// Ignored when [EncodeOptions.encode] is `false`.
typedef Encoder = String Function(
  dynamic value, {
  Encoding? charset,
  Format? format,
});