Skip to content

Commit a675005

Browse files
committed
minor readme fixes.
1 parent 329b855 commit a675005

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ data in memory anyway; your data sets can get relatively large before you even n
3939
[redis]: https://redis.io
4040
[lodash chaining]: https://lodash.com/docs#lodash
4141

42-
### In Browser Database
42+
### In-Browser Database
4343

4444
One of the new and exciting use cases is that TrivialDB is now usable inside a browser! By default it will read/write
4545
JSON over REST, but you can easily change this to use IndexedDB or LocalStorage. You can even use a bundler like
@@ -49,6 +49,8 @@ This helps when developing static, "server-less" sites; you can have a developme
4949
locally, commit it to git, and then have your static site generation simply include the new JSON files and push them
5050
out. Your client-side code can still work with TrivialDB as if it was a normal application.
5151

52+
(For more information, please see the ["Reading and Writing in a Browser"](#reading-and-writing-in-a-browser) section.)
53+
5254
## Lodash Shoutout
5355

5456
This entire project is made possible by the [lodash][] project. If it wasn't for their hard work and the effort they put
@@ -211,8 +213,7 @@ TrivialDB may return some nonsensical errors. (This may improve in the future.)
211213

212214
#### `readFunc` and `writeFunc`
213215

214-
You can override the built in underlying read and/or write functions. By default these will read/write from the disk.
215-
However, you can override them with any `Promise` returning function.
216+
You can override the built in underlying read and/or write functions. By default these will read/write from the disk (in node) or `GET`/`POST` to the specified path in the browser. You can, however, override them with any `Promise` returning function.
216217

217218
* `readFunc(path)` - This function is passed the absolute path of the file as `path`. The `rootDir` will be `/` on
218219
browser, or the root directory of the running node process. This function _must_ return a `Promise`. The promise's

0 commit comments

Comments
 (0)