nexxtway/react-rainbow

View on GitHub
src/components/TimePicker/helpers/getPrevMinute.js

Summary

Maintainability
A
55 mins
Test Coverage
export default function getPrevMinute(value) {
    const number = Number(value);
    if (!value || number === 0) {
        return '59';
    }
    return String(number - 1);
}