mirror of
https://github.com/kettanaito/naming-cheatsheet.git
synced 2025-08-11 07:34:02 +02:00
Add summary
This commit is contained in:
39
README.md
39
README.md
@ -7,6 +7,25 @@
|
|||||||
# Naming cheatsheet
|
# Naming cheatsheet
|
||||||
Naming things is hard. Let's make it easier.
|
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
|
## 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.
|
* 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`
|
#### `has`
|
||||||
Describes whether the current context possesses a certain value or state.
|
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`
|
#### `prev`/`next`
|
||||||
Indicate the previous and the next state of the variable in the current context. Useful for describing a state mutation.
|
Indicate the previous and the next state of the variable in the current context. Useful for describing a state mutation.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user