diff --git a/API.md b/API.md index bd438ec..4ebb8be 100644 --- a/API.md +++ b/API.md @@ -58,7 +58,7 @@ const db = await orbitdb.keyvalue('profile') - [OrbitDB.parseAddress(address)](#parseaddressaddress) **[Store API](#store)** -- [store.load()](#storeload) +- [store.load()](#storeloadamount) - [store.close()](#storeclose) - [store.drop()](#storedrop) - [store.key](#storekey) @@ -387,9 +387,9 @@ OrbitDB.parseAddress('/orbitdb/Qmdgwt7w4uBsw8LXduzCd18zfGXeTmBsiR8edQ1hSfzcJC/fi Every database (store) has the following methods available in addition to their specific methods. -#### store.load() +#### store.load([amount]) -Load the locally persisted database state to memory. +Load the locally persisted database state to memory. Use the optional `amount` argument to limit the number of entries loaded into memory, starting from the head(s) (Default: `-1` will load all entries) With events: ```javascript diff --git a/README.md b/README.md index e8f7f6d..1fffb6c 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ After creating an `OrbitDB` instance , you can access the different data stores. - [OrbitDB.parseAddress(address)](https://github.com/orbitdb/orbit-db/blob/master/API.md#parseaddressaddress) **[Store API](https://github.com/orbitdb/orbit-db/blob/master/API.md#store)** -- [load()](https://github.com/orbitdb/orbit-db/blob/master/API.md#storeload) +- [load()](https://github.com/orbitdb/orbit-db/blob/master/API.md#storeloadamount) - [close()](https://github.com/orbitdb/orbit-db/blob/master/API.md#storeclose) - [drop()](https://github.com/orbitdb/orbit-db/blob/master/API.md#storedrop) - [key](https://github.com/orbitdb/orbit-db/blob/master/API.md#storekey)