Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Commit

Permalink
docs: add store.has to readme as it is in the test suite (#19)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jacob Heun <jacobheun@gmail.com>
  • Loading branch information
Jacob Heun authored and daviddias committed Apr 3, 2018
1 parent 8bac928 commit ddd71e9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,22 @@ Also, every namespace can be parametrized to embed relevant object information.
These methods will be present on every datastore. `Key` always means an instance of the above mentioned Key type. Every datastore is generic over the `Value` type, though currently all backing implementations are implemented only for [`Buffer`](https://nodejs.org/docs/latest/api/buffer.html).

### `has(key, callback)`

- `key: Key`
- `callback: function(Error, bool)`

Check for the existence of a given key

```js
store.has(new Key('awesome'), (err, exists) => {
if (err) {
throw err
}
console.log('is it there', exists)
})
```

### `put(key, value, callback)`

- `key: Key`
Expand Down

0 comments on commit ddd71e9

Please sign in to comment.