Skip to content

Commit b0f8ad4

Browse files
committed
fix(README): Update documentation
1 parent e219124 commit b0f8ad4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ yarn add node-json-db
1818
## Inner Working
1919

2020
### Data
21-
The module store the data using JavaScript Object directly into a JSON file. You can easily traverse the data to reach
21+
The module stores the data using JavaScript Object directly into a JSON file. You can easily traverse the data to reach
2222
directly the interesting property using the DataPath. The principle of DataPath is the same as XMLPath.
2323

2424
### Example
@@ -44,6 +44,7 @@ See [test](https://github.com/Belphemur/node-json-db/tree/master/test) for more
4444
import { JsonDB } from 'node-json-db';
4545
import { Config } from 'node-json-db/dist/lib/JsonDBConfig'
4646

47+
// The first argument is the database filename. If no extension, '.json' is assumed and automatically added.
4748
// The second argument is used to tell the DB to save after each push
4849
// If you put false, you'll have to call the save() method.
4950
// The third argument is to ask JsonDB to save the database in an human readable format. (default false)
@@ -143,6 +144,8 @@ You can also access the information stored into arrays and manipulate them.
143144
```typescript
144145
import { JsonDB } from 'node-json-db';
145146
import { Config } from 'node-json-db/dist/lib/JsonDBConfig'
147+
148+
// The first argument is the database filename. If no extension, '.json' is assumed and automatically added.
146149
// The second argument is used to tell the DB to save after each push
147150
// If you put false, you'll have to call the save() method.
148151
// The third argument is to ask JsonDB to save the database in an human readable format. (default false)
@@ -236,10 +239,10 @@ db.getData("/arraytest/lastItemArray[-1]");
236239

237240
# Limitations
238241

239-
## Object with `seperator` in key
240-
Object pushed with key containing the `seperator` character won't be reachable. See [#75](https://github.com/Belphemur/node-json-db/issues/75).
242+
## Object with `separator` in key
243+
Object pushed with key containing the `separator` character won't be reachable. See [#75](https://github.com/Belphemur/node-json-db/issues/75).
241244

242-
Please consider the `seperator` as a reserved character by node-json-db.
245+
Please consider the `separator` as a reserved character by node-json-db.
243246

244247

245248
# Thanks

0 commit comments

Comments
 (0)