Skip to content

Built-in Transformers ​

QuickModel comes with a set of built-in transformers to handle common data types.

TransformerDescription
arraybufferHandles arraybuffer data types.
bigintHandles bigint data types.
bigint64arrayHandles bigint64array data types.
biguint64arrayHandles biguint64array data types.
booleanHandles boolean data types.
bufferHandles buffer data types.
dataviewHandles dataview data types.
dateHandles date data types.
errorHandles error data types.
float32arrayHandles float32array data types.
float64arrayHandles float64array data types.
int16arrayHandles int16array data types.
int32arrayHandles int32array data types.
int8arrayHandles int8array data types.
mapHandles map data types.
numberHandles number data types.
regexpHandles regexp data types.
setHandles set data types.
sharedarraybufferHandles sharedarraybuffer data types.
special-floatHandles NaN, Infinity, -Infinity values losslessly over JSON.
stringHandles string data types.
symbolHandles symbol data types.
textdecoderHandles textdecoder data types.
textencoderHandles textencoder data types.
uint16arrayHandles uint16array data types.
uint32arrayHandles uint32array data types.
uint8arrayHandles uint8array data types.
uint8clampedarrayHandles uint8clampedarray data types.
urlHandles url data types.
urlsearchparamsHandles urlsearchparams data types.
weakmapHandles weakmap data types.
weaksetHandles weakset data types.

See Custom Transformers to add your own.

Performance ​

⚡ Performance Benchmark

Hover the bars to see details

1k objects — auto vs manual coercion. QM: one decorator, zero extra code. Zod/valibot: manual transform per field. class-transformer: only Date via @Type, not BigInt/Map/Set. Plain JS, TypeBox, yup, joi, vest, superjson and arktype cannot do model-level coercion.

class-transformer
68k ops/s
QuickModel
34k ops/s

Not applicable in this scenario: superjson, Plain JS

← slower       faster →