Skip to content

Commit baeadcf

Browse files
committed
update README.md
1 parent d6ca562 commit baeadcf

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,17 @@ More examples in directory
212212

213213
```toStream``` - The property, a function pointer. It is necessary to determine before use. Will be called for send a message to the remote host
214214

215+
```undefinedResult``` - allow to set default result of locally called function if it returns undefined
216+
217+
usage example:
218+
```js
219+
jrpc.undefinedResult = null; // or false, or whatever
220+
jrpc.on('find', function(key) {
221+
if (db.exists(key))
222+
return db.get(key);
223+
// If there is nothing found then just return nothing
224+
});
225+
```
215226
## Dependecies
216227

217228
- NodeJS <= 8.11.4 (if using within a NodeJS app, or compiling) || Latest browser (if using client side)

0 commit comments

Comments
 (0)