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 🍏
6 lines • 798 B
JavaScript
export const getSafeInitialValue = initialValue => ({
hours: typeof (initialValue === null || initialValue === void 0 ? void 0 : initialValue.hours) === "number" && !isNaN(initialValue === null || initialValue === void 0 ? void 0 : initialValue.hours) ? initialValue.hours : 0,
minutes: typeof (initialValue === null || initialValue === void 0 ? void 0 : initialValue.minutes) === "number" && !isNaN(initialValue === null || initialValue === void 0 ? void 0 : initialValue.minutes) ? initialValue.minutes : 0,
seconds: typeof (initialValue === null || initialValue === void 0 ? void 0 : initialValue.seconds) === "number" && !isNaN(initialValue === null || initialValue === void 0 ? void 0 : initialValue.seconds) ? initialValue.seconds : 0
});
//# sourceMappingURL=getSafeInitialValue.js.map