Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const scrubber = ({
from = 0,
to = 1,
ease = linear,
reverseEase = false
}): Action => {
if (reverseEase) {
ease = createReversedEasing(ease);
}
return action(
({ update }): ScrubberSubscription => ({
seek: progress => update(progress)
})
).pipe(
ease,
(v: number) => mix(from, to, v)
);
};