Skip to content

Commit a558bf7

Browse files
committed
Updates README
1 parent cd8ae94 commit a558bf7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ In other words, **high context emphasizes the meaning of a variable**.
113113

114114
The verb part of your function name. The most important part responsible for describing what the function *does*.
115115

116-
#### `get`
116+
### `get`
117117
Accesses data immediately (i.e. shorthand getter of internal data).
118118
```js
119119
function getFruitsCount() {
120120
return this.fruits.length;
121121
}
122122
```
123123

124-
#### `set`
124+
### `set`
125125
Declaratively sets a variable with value `A` to value `B`.
126126

127127
```js
@@ -135,7 +135,7 @@ setFruits(5)
135135
console.log(fruits) // 5
136136
```
137137

138-
#### `reset`
138+
### `reset`
139139
Sets a variable back to its initial value or state.
140140

141141
```js
@@ -152,15 +152,15 @@ resetFruits()
152152
console.log(fruits) // 5
153153
```
154154

155-
#### `fetch`
155+
### `fetch`
156156
Requests for a data, which takes time (i.e. async request).
157157
```js
158158
function fetchPosts(postCount) {
159159
return fetch('https://api.dev/posts', { ... })
160160
}
161161
```
162162

163-
#### `remove`
163+
### `remove`
164164
Removes something *from* somewhere.
165165

166166
For example, if you have a collection of selected filters on a search page, removing one of them from the collection is `removeFilter`, **not** `deleteFilter` (and this is how you would naturally say it in English as well):
@@ -179,7 +179,7 @@ function removeFilter(filterName) {
179179
}
180180
```
181181

182-
#### `delete`
182+
### `delete`
183183
Completely erazes something from the realms of existance.
184184

185185
Imagine you are a content editor, and there is that notorious post you wish to get rid of. Once you clicked a shiny "Delete post" button, the CMS performed a `deletePost` action, **not** `removePost`.
@@ -190,7 +190,7 @@ function deletePost(id) {
190190
}
191191
```
192192

193-
#### `compose`
193+
### `compose`
194194
Creates a new data from the existing one. Mostly applicable to strings or objects.
195195

196196
```js
@@ -199,7 +199,7 @@ function composePageUrl(pageName, pageId) {
199199
}
200200
```
201201

202-
#### `handle`
202+
### `handle`
203203
Handles a dedicated action. Often used in naming the callback methods.
204204

205205
```js

0 commit comments

Comments
 (0)