undefined values, at the top-level and properties of nested objects,
are silently dropped
invalid attribute value types are removed, with a warning
attribute count and value length limits are applied
The call signature is meant to make it ergonomic for creating SDK things
that take attributes and droppedAttributesCount arguments, e.g.:
this.links({
context: opts.context,
...cleanAttributes(opts.attributes, attributeLimits)
});
If the given inAttributes is undefined, then the properties in the
return value will be undefined.
Clean a given set of attributes.
undefinedvalues, at the top-level and properties of nested objects, are silently droppedThe call signature is meant to make it ergonomic for creating SDK things that take
attributesanddroppedAttributesCountarguments, e.g.: this.links({ context: opts.context, ...cleanAttributes(opts.attributes, attributeLimits) });If the given
inAttributesis undefined, then the properties in the return value will be undefined.