Socket
Socket
Sign inDemoInstall

sqs-consumer

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sqs-consumer - npm Package Compare versions

Comparing version 5.1.1 to 5.2.0

1

dist/consumer.d.ts

@@ -33,2 +33,3 @@ import * as SQS from 'aws-sdk/clients/sqs';

constructor(options: ConsumerOptions);
readonly isRunning: boolean;
static create(options: ConsumerOptions): Consumer;

@@ -35,0 +36,0 @@ start(): void;

@@ -70,2 +70,5 @@ "use strict";

}
get isRunning() {
return !this.stopped;
}
static create(options) {

@@ -72,0 +75,0 @@ return new Consumer(options);

2

package.json
{
"name": "sqs-consumer",
"version": "5.1.1",
"version": "5.2.0",
"description": "Build SQS-based Node applications without the boilerplate",

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

@@ -118,2 +118,6 @@ # sqs-consumer

### `consumer.isRunning`
Returns the current polling state of the consumer: `true` if it is actively polling, `false` if it is not.
### Events

@@ -120,0 +124,0 @@

@@ -122,2 +122,6 @@ const debug = require('debug')('sqs-consumer');

public get isRunning(): boolean {
return !this.stopped;
}
public static create(options: ConsumerOptions): Consumer {

@@ -124,0 +128,0 @@ return new Consumer(options);

@@ -612,2 +612,16 @@ import { assert } from 'chai';

});
describe('isRunning', async () => {
it('returns true if the consumer is polling', () => {
consumer.start();
assert.isTrue(consumer.isRunning);
consumer.stop();
});
it('returns false if the consumer is not polling', () => {
consumer.start();
consumer.stop();
assert.isFalse(consumer.isRunning);
});
});
});
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