Add summary

This commit is contained in:
Nadia Ridko
2018-01-12 11:14:24 +02:00
parent 24d2143b2d
commit da0a2a2ebe

View File

@ -7,6 +7,25 @@
# Naming cheatsheet
Naming things is hard. Let's make it easier.
## Summary
* [Guidelines](#guidelines)
* [HC/LC Pattern](#hclc-pattern)
* **[Actions](#actions)**
* [get](#get)
* [fetch](#fetch)
* [set](#set)
* [reset](#reset)
* [remove](#remove)
* [delete](#delete)
* [compose](#compose)
* [handle](#handle)
* **[Prefixes](#prefixes)**
* [is](#is)
* [has](#has)
* [should](#should)
* [min/max](#minmax)
* [prev/next](#prevnext)
## Guidelines
* Pick **one** naming convention and follow it. Whether it is `likeThis`, or `like_this`, or anyhow else, it does not matter. What matters is consistency in your work.
@ -196,16 +215,6 @@ if (isBlue && isPresent) {
}
```
#### `min`/`max`
Represent minimum or maximum value. Handy when describing boundaries or allowed limits.
```js
function PostsList() {
this.minPosts = 3;
this.maxPosts = 10;
}
```
#### `has`
Describes whether the current context possesses a certain value or state.
@ -229,6 +238,16 @@ function shouldUpdateUrl(url) {
}
```
#### `min`/`max`
Represent minimum or maximum value. Handy when describing boundaries or allowed limits.
```js
function PostsList() {
this.minPosts = 3;
this.maxPosts = 10;
}
```
#### `prev`/`next`
Indicate the previous and the next state of the variable in the current context. Useful for describing a state mutation.