import { AND } from '../constants' ; export const toSentenceSerial = ( array ) => array . length === 1 ? array [ 0 ] : `${ array . slice ( 0 , array . length - 1 ) . join ( ', ' ) }${ array . length === 2 ? '' : ',' } ${ AND } ${ array . slice ( - 1 ) }` ;