concat
$concat
Returns a new array with the specified values appended to the input array.
Throws SchemaError at compile time if no arguments are provided.
Throws ConstraintError at runtime if the input is not an array.
Parameters
- Array of values to append (required, at least one).
Example
// Append default scopes to a user-supplied scopes array
new Schema('array').transformer({$concat: ['read:profile', 'read:email']})
// ['custom:scope'] → ['custom:scope', 'read:profile', 'read:email']
// Always include a sentinel value at the end of an array
new Schema('array').transformer({$concat: [null]})