Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
keys(transitionsMap).forEach(name => {
const map = transitionsMap[name];
const transitionName = eventsToTransitionName[name] || name;
// Unbind the associated global handler.
removeTransitionState(transitionName, boundHandlers.shift());
// Empty the associated element set.
map.clear();
});
const unsubscribe = () => {
// Unbind all the transition states.
removeTransitionState('attributeChanged', attributeChanged);
// Remove all elements from the internal cache.
keys(transitionsMap).forEach(name => {
const map = transitionsMap[name];
const transitionName = eventsToTransitionName[name] || name;
// Unbind the associated global handler.
removeTransitionState(transitionName, boundHandlers.shift());
// Empty the associated element set.
map.clear();
});
// Empty the bound handlers.
boundHandlers.length = 0;
};
value: (state, callback) => removeTransitionState(state, callback),
});