export function capitalize ( text ) { return text . charAt ( 0 ) . toUpperCase ( ) + text . slice ( 1 ) ; } export function pluralize ( text , times , options ? ) { const postfix = options ?. postfix || 's' ; return `${ text }${ times === 1 ? '' : postfix }` ; } export function uuidToBytes ( uuid ) { return Buffer . from ( uuid . replace ( /-/g , '' ) , 'hex' ) ; } export function bytesToUUID ( uuid ) { const str = uuid . toString ( 'hex' ) ; return `${ str . slice ( 0 , 8 ) }-${ str . slice ( 8 , 12 ) }-${ str . slice ( 12 , 16 ) }-${ str . slice ( 16 , 20 ) }-${ str . slice ( 20 ) }` ; }