Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const cartItems = carts.map((cart) => {
const item = items.find((_item) => _item.id === cart.itemId);
if (Hf.isObject(item)) {
return {
...item,
quantity: cart.quantity
};
}
return cart;
});
const [
animatedImage
] = component.lookupComponentRefs(
`animatedImage`
);
const {
from,
to,
duration,
easing
} = Hf.fallback({
duration: 300,
easing: `ease`
}).of(definition);
if (Hf.isDefined(animatedImage)) {
if (Hf.isObject(from) && Hf.isObject(to)) {
animatedImage.transition(from, to, duration, easing);
} else if (!Hf.isObject(from) && Hf.isObject(to)) {
animatedImage.transitionTo(to, duration, easing);
}
}
},
render: function render () {
animatedView
] = component.lookupComponentRefs(
`animatedView`
);
const {
from,
to,
duration,
easing
} = Hf.fallback({
duration: 300,
easing: `ease`
}).of(definition);
if (Hf.isDefined(animatedView)) {
if (Hf.isObject(from) && Hf.isObject(to)) {
animatedView.transition(from, to, duration, easing);
} else if (!Hf.isObject(from) && Hf.isObject(to)) {
animatedView.transitionTo(to, duration, easing);
}
}
},
scrollTo: function scrollTo (destination) {
animatedView
] = component.lookupComponentRefs(
`animatedView`
);
const {
from,
to,
duration,
easing
} = Hf.fallback({
duration: 300,
easing: `ease`
}).of(definition);
if (Hf.isDefined(animatedView)) {
if (Hf.isObject(from) && Hf.isObject(to)) {
animatedView.transition(from, to, duration, easing);
} else if (!Hf.isObject(from) && Hf.isObject(to)) {
animatedView.transitionTo(to, duration, easing);
}
}
},
render: function render () {
animatedText
] = component.lookupComponentRefs(
`animatedText`
);
const {
from,
to,
duration,
easing
} = Hf.fallback({
duration: 300,
easing: `ease`
}).of(definition);
if (Hf.isDefined(animatedText)) {
if (Hf.isObject(from) && Hf.isObject(to)) {
animatedText.transition(from, to, duration, easing);
} else if (!Hf.isObject(from) && Hf.isObject(to)) {
animatedText.transitionTo(to, duration, easing);
}
}
},
render: function render () {