Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clerx

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clerx - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "clerx",
"version": "2.0.1",
"version": "2.0.2",
"description": "The Clerical Rx Suite",

@@ -5,0 +5,0 @@ "main": "build/main/index.js",

@@ -15,11 +15,23 @@ # clerx 💁

As defined in the RxJS docs:
>[Operators](https://rxjs.dev/guide/operators) are the essential pieces that
> allow complex asynchronous code to be easily composed in a declarative manner.
> Operators are functions.
### `rateLimiter(count, slidingWindowTime)`
Defer sending events if `count` events occur within `slidingWindowTime`. Optionally,
stop deferring if the wait time goes past `timeoutDue`.
Defer sending events if `count` events occur within `slidingWindowTime` (milliseconds). Optionally, stop deferring if the wait time goes past `timeoutDue`. Returns an Observable.
#### Examples
**Only two events within three seconds**
**Only send two events within three seconds**
In this example, only 2 (`count`) events are sent during a 3 second
(3000 ms `slidingWindowTime`) sliding window. As displayed in the marble
diagram, additional events beyond 2 events in the sliding window will be
deferred.
```

@@ -37,2 +49,5 @@ abcdef--g---

Similarly, this example limits events to one (`count`) event in a five second
(5000 ms `slidingWindowTime`) window. The marble diagram shows how the events are distributed over time.
```

@@ -50,5 +65,9 @@ -(abc)def

As defined in the RxJS docs:
>[Observables](https://rxjs.dev/guide/observable) are lazy Push collections of multiple values.
### `postDelay(event: T, dueTime): Observable<T>`
Creates an observable that emits the `event` then waits `dueTime` before
Creates an observable that emits the `event` then waits `dueTime` (milliseconds) before
closing the observable, like so:

@@ -60,3 +79,3 @@

**Delay 5 seconds after emitting an event**
**Example: Delay 5 seconds after emitting an event**

@@ -73,6 +92,8 @@ ```

Creates an Observable that emits sequential numbers in an exponentially increasing interval of time.
Creates an Observable that emits sequential numbers in an exponentially increasing interval of time. `backoff` is the starting time interval, in milliseconds, and will exponentially increase with each event.
**exponentially increase delay starting at a one second interval**
**Example: Exponentially increase delay starting at a one second interval**
The marble diagram illustrates the exponentially growing duration between events.
```

@@ -79,0 +100,0 @@ > intervalBackoff(1000)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc