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

energyhub-events

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

energyhub-events - npm Package Compare versions

Comparing version 0.1.0-alpha to 0.1.0-alpha.0

22

lib/driver/cache.js

@@ -1,2 +0,2 @@

"use strict";
'use strict';

@@ -26,3 +26,3 @@ Object.defineProperty(exports, "__esModule", {

_createClass(CacheDriver, [{
key: "checksum",
key: 'checksum',
value: function checksum() {

@@ -38,11 +38,19 @@ var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (err, md5) {};

}, {
key: "stream",
key: 'stream',
value: function stream() {
if (!this.enabled) return this.driver.stream();
if (this.cache.has(this.key)) {
return this.cache.get(this.key);
var cache = this.cache,
driver = this.driver,
key = this.key;
if (cache.has(key)) {
return cache.get(key);
} else {
var innerStream = this.driver.stream();
this.cache.set(this.key, innerStream);
var innerStream = driver.stream();
cache.set(key, innerStream);
innerStream.on('error', function () {
cache.remove(key);
});
return innerStream;

@@ -49,0 +57,0 @@ }

@@ -39,3 +39,3 @@ {

},
"version": "0.1.0-alpha",
"version": "0.1.0-alpha.0",
"devDependencies": {

@@ -42,0 +42,0 @@ "babel-core": "^6.26.3",

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