unsafeMap
(DOC) UNSAFE! A simpler version of unsafeMap for operations that don't change the timeline type.
(DOC) UNSAFE! Maps each timeline object to another object, of potentially a different type, at potentially a different time.
This operation may require the bounds of evaluation to be changed for the timeline it is called on. This can happen if the intervals of any segment are being shifted. This is what the boundsTransformer argument is for. This will ensure that the timeline map is called on will evaluate on the proper bounds.
In rare cases, operations might intentionally shift or create intervals outside the requested bounds, requiring them to be truncated. Pass true
for truncate if so (this will add an extra step to truncate the result).
Parameters
the result payload type
the result timeline type
the constructor of the result timeline
how to transform the bounds for the timeline map is called on
whether to truncate the result before returning
a mapper function that converts each timeline object to another object
See also
for an explanation of why this method is unsafe.