Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function calcOrigin(origin: number | string, offset: number, size: number) {
return typeof origin === 'string'
? origin
: px.transform(offset + size * origin);
}
const progressToPixels = (progress: number, length: number) =>
px.transform(progress * length);