UNPKG

react-native-timer-picker

Version:

A simple, flexible, performant duration picker for React Native apps 🔥 Great for timers, alarms and duration inputs ⏰🕰️⏳ Includes iOS-style haptic and audio feedback 🍏

12 lines 420 B
export const getInitialScrollIndex = variables => { const { disableInfiniteScroll, interval, numberOfItems, padWithNItems, repeatNumbersNTimes, value } = variables; return Math.max(numberOfItems * Math.floor(repeatNumbersNTimes / 2) + (value / interval + numberOfItems) % numberOfItems - (!disableInfiniteScroll ? padWithNItems : 0), 0); }; //# sourceMappingURL=getInitialScrollIndex.js.map