All files / src/lib stringify.js

100% Statements 3/3
100% Branches 2/2
100% Functions 1/1
100% Lines 3/3
1 2 3 4 5 6 7 8      84x 23x 61x    
import isTwelveHourTime from './is-twelve-hour-time';
// stringify
export default groups => {
  if (isTwelveHourTime(groups))
    return groups.slice(0, -1).join(':') + ' ' + groups[groups.length - 1];
  return groups.join(':');
};