Skip to content

Commit 612d7a4

Browse files
authored
Fix formatting of headings in README
1 parent d6077d9 commit 612d7a4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ edn.parse(edn.encode({
5353
```
5454
Will output `"electric"`. Definitely working in both directions.
5555

56-
###Command Line
56+
### Command Line
5757
If you have installed via `npm` you will have a jsedn script that accepts input via pipe/stdin. Currently takes:
5858

5959
* `-s` flag for "select" which you pass a path separated by space
@@ -82,14 +82,14 @@ Will turn a valid edn string into a js object structure based upon the classes d
8282
edn.parse("{:a-keyword! [1 2 -3.4]}");
8383
```
8484

85-
#####encode (jsObj)
85+
##### encode (jsObj)
8686
Will encode both native JS and any object providing a ednEncode method.
8787

8888
```js
8989
edn.encode({"a-keyword!": [1,2,-3.4]});
9090
```
9191

92-
#####setTagAction (tag, action)
92+
##### setTagAction (tag, action)
9393
Will add the tag action to be performed on any data prepended by said tag.
9494

9595
```js
@@ -100,21 +100,21 @@ edn.setTagAction(new edn.Tag('myApp', 'tagName'), function(obj) {
100100
});
101101
```
102102

103-
#####setTokenPattern (tokenName, pattern)
103+
##### setTokenPattern (tokenName, pattern)
104104
If for some reason you would like to over-ride or add a new token pattern.
105105

106106
```js
107107
edn.setTokenPattern()))
108108
```
109109

110-
#####setTokenAction (tokenName, actionCallback)
110+
##### setTokenAction (tokenName, actionCallback)
111111
Allows for customization of token handling upon match. For instance if you decided you would prefer nil to be represented by undefined instead of null (default).
112112

113113
```js
114114
edn.setTokenAction('nil', function(token) { return undefined;});
115115
```
116116

117-
#####setTypeClass (type, class)
117+
##### setTypeClass (type, class)
118118
This is useful if you want to over-ride the naive implementations of Map etc.
119119

120120
```js
@@ -206,7 +206,7 @@ Used to create symbols from with in js for encoding into edn.
206206
### Keyword
207207
As above but for keywords. Note that the constructor enforced that keywords start with a ":" character.
208208

209-
####Iterable [List Vector Set]
209+
#### Iterable [List Vector Set]
210210
List, Vector and Set all implement the following methods:
211211

212212
* `exists (key)` -> boolean indicating existance of key
@@ -216,7 +216,7 @@ List, Vector and Set all implement the following methods:
216216
* `map (iter)` -> iterate over all members calling iter on each and returning a new instace of self
217217
* `walk (iter)` -> recursively walk the data returning a new instance of self
218218

219-
####Map
219+
#### Map
220220
Supports any type of object as key. Supports all of the methods listed for Iterable plus `indexOf` which returns the index of the item, which can be 0 and thus non-truthy.
221221

222222
`each`, `map` and `walk` all accept a callback which takes the value as the first argument and the key as the second. In the case of map and walk if you want to modify the key you must return a `Pair` object e.g.
@@ -231,7 +231,7 @@ yields:
231231
{:x-squared 90000 :y-squared 640000}
232232
```
233233

234-
####Tag
234+
#### Tag
235235
Used for defining Tag Actions. Has a constructor which accepts 2..n args where the first arg is your a namespace and the rest are used to categorize the tag. **Tag** provides two methods `ns` and `dn`:
236236

237237
```js
@@ -245,7 +245,7 @@ Constructor also supports being passed single argument delimited by / e.g:
245245
new edn.Tag('myApp/people/special/stuff')
246246
```
247247

248-
####Tagged
248+
#### Tagged
249249
If you do not have tag handlers specified for a given tag you will end up with **Tagged** items in your result which have two methods:
250250

251251
tag() -> Tag object found
@@ -263,7 +263,7 @@ outputs:
263263
#myApp/person {"name" "walter" "age" 300}
264264
```
265265

266-
##Conversion Table
266+
## Conversion Table
267267

268268
| element | edn | jsedn | js |
269269
| --------------- | -------------------- | ------------------ | --- |

0 commit comments

Comments
 (0)