param n param singular param plural export function pluralize ( n , singular , plural ? ) { if ( n === 1 ) { return singular ; } if ( plural !== undefined ) { return plural ; } return `${ singular }s` ; } /**
 * Replaces all the instances of [[toReplace]] by [[replacement]] in [[str]].
 */ export function replaceAll ( str , toReplace , replacement ) { return str . split ( toReplace ) . join ( replacement ) ; }