New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hmpo-cached-model

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hmpo-cached-model - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

README.md

4

lib/index.js

@@ -114,3 +114,5 @@ 'use strict';

this.stop();
if (this.options.storeInterval) {
this.loadFromStore();
this.storeTimer = setInterval(

@@ -121,3 +123,5 @@ this.loadFromStore.bind(this),

}
if (this.options.apiInterval) {
this.loadFromApi();
this.apiTimer = setInterval(

@@ -124,0 +128,0 @@ this.loadFromApi.bind(this),

2

package.json
{
"name": "hmpo-cached-model",
"version": "1.0.4",
"version": "1.0.5",
"description": "Cached polling model",

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

@@ -392,2 +392,4 @@ 'use strict';

sinon.stub(HmpoCachedModel.prototype, 'stop');
sinon.stub(HmpoCachedModel.prototype, 'loadFromStore');
sinon.stub(HmpoCachedModel.prototype, 'loadFromApi');
});

@@ -397,2 +399,4 @@

HmpoCachedModel.prototype.stop.restore();
HmpoCachedModel.prototype.loadFromStore.restore();
HmpoCachedModel.prototype.loadFromApi.restore();
});

@@ -409,2 +413,8 @@

it('should run the two loding functions', () => {
instance.start();
HmpoCachedModel.prototype.loadFromStore.should.have.been.called;
HmpoCachedModel.prototype.loadFromApi.should.have.been.called;
});
it('should create two interval timers', () => {

@@ -419,2 +429,3 @@ instance.start();

instance.start();
HmpoCachedModel.prototype.loadFromStore.should.not.have.been.called;
expect(instance.storeTimer).to.not.be.ok;

@@ -426,2 +437,3 @@ });

instance.start();
HmpoCachedModel.prototype.loadFromApi.should.not.have.been.called;
expect(instance.apiTimer).to.not.be.ok;

@@ -428,0 +440,0 @@ });

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