mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-07-30 17:59:13 -04:00
6 lines
217 B
TypeScript
6 lines
217 B
TypeScript
/**
|
|
* Returns the possessive form of a name.
|
|
* Adds 's unless the name already ends with s, in which case just adds '.
|
|
*/
|
|
export const possessive = (name: string) => (name.endsWith('s') ? `${name}'` : `${name}'s`)
|