svelte-motion
Version:
Svelte animation library based on the React library framer-motion.
14 lines (12 loc) • 304 B
JavaScript
/**
based on framer-motion@4.0.3,
Copyright (c) 2018 Framer B.V.
*/
function addUniqueItem(arr, item) {
arr.indexOf(item) === -1 && arr.push(item);
}
function removeItem(arr, item) {
var index = arr.indexOf(item);
index > -1 && arr.splice(index, 1);
}
export { addUniqueItem, removeItem };