Skip to content

Commit 4e52046

Browse files
committed
doc fix
1 parent 172f822 commit 4e52046

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,31 @@ foo.renew().then(function () {
165165

166166
### .destroy()
167167
Unbinds listeners/watchers from this client
168+
169+
## Events
170+
171+
### unlock
172+
Emits when the key is unlocked (node agnostic)
173+
174+
```javascript
175+
foo.on(Microlock.events.unlocked, function () {
176+
//handle unlocked with constant
177+
});
178+
179+
foo.on('unlocked', function () {
180+
//handle unlocked with string
181+
});
182+
```
183+
184+
### locked
185+
Emits when the key is locked (node agnostic)
186+
187+
```javascript
188+
foo.on(Microlock.events.locked, function () {
189+
//handle locked with constant
190+
});
191+
192+
foo.on('locked', function () {
193+
//handle locked with string
194+
});
195+
```

0 commit comments

Comments
 (0)