merge(a: record, b: record) → record

Category: [records](builtinsrecords)_

Combine two records into one; fields of b win on a name clash.

ParameterTypeDescriptionRemarks
arecordThe base record.
brecordThe overriding record.
returnsrecordA record with the union of both field sets.
wcl
merge({ host: "localhost", port: 80 }, { port: 8080 })   // the second record wins on the port clash → { host: "localhost", port: 8080 }