Skip to content

Commit

Permalink
docs: singular/plurals for compound terms kettanaito#51
Browse files Browse the repository at this point in the history
  • Loading branch information
octavian-nita committed Mar 5, 2021
1 parent 99ff58c commit ba11508
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,15 @@ const friend = ['Bob', 'Tony', 'Tanya']
const friend = 'Bob'
const friends = ['Bob', 'Tony', 'Tanya']
```

Pay attention to what noun in a compound term is used in plural form. In most cases, not all nouns should be plural.

```js
/* Bad */
const documentsTypes = ['PDF', 'JPG']
const childrenPaths = documentsTypes.map(docType => `${basePath}/${docType}`);

/* Good */
const documentTypes = ['PDF', 'JPG']
const childPaths = documentTypes.map(docType => `${basePath}/${docType}`);
```

0 comments on commit ba11508

Please sign in to comment.