Browse Source

peekUntil in README

Herbert Vojčík 8 years ago
parent
commit
084ee5af33
1 changed files with 8 additions and 0 deletions
  1. 8 0
      README.md

+ 8 - 0
README.md

@@ -26,6 +26,14 @@ and use the global `uSim`.
  Same as `usim.peek()`, but instead of returning the object,
  it calls the callback with the object or `null` as the only argument.
 
+ - `usim.peekUntil(time)`
+ Same as `usim.peek()`, but if time of object if bigger than `time`,
+ `null` is returned instead and object stays in the schedule.
+
+ - `usim.peekUntil(time, cb)`
+ Same as `usim.peek(cb)`, but if time of object if bigger than `time`,
+ `null` is passed instead and object stays in the schedule.
+
  - `usim.stream(cb)`
  Calls `cb` with all scheduled objects, as if `usim.peek(cb)`
  was called in loop while there are some scheduled objects.