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

@creditkarma/async-scope

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@creditkarma/async-scope - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

28

dist/main/AsyncScope.js

@@ -30,10 +30,2 @@ "use strict";

}
if (self.asyncMap.oldestId === -1) {
self.asyncMap.oldestId = asyncId;
}
const previousNode = self.asyncMap[self.previousId];
if (previousNode !== undefined) {
previousNode.nextId = asyncId;
}
self.previousId = asyncId;
self._purge();

@@ -86,6 +78,10 @@ },

this.asyncMap.oldestId = nodeToDelete.nextId;
this.asyncMap.size -= 1;
if (nodeToDelete.parentId !== null) {
const parentNode = this.asyncMap[nodeToDelete.parentId];
if (parentNode !== undefined) {
parentNode.children.splice(parentNode.children.indexOf(oldestId), 1);
const indexToRemove = parentNode.children.indexOf(oldestId);
if (indexToRemove > -1) {
parentNode.children.splice(indexToRemove, 1);
}
}

@@ -97,6 +93,3 @@ }

if (this.asyncMap[asyncId] === undefined) {
if (this.asyncMap.size < this.maxSize) {
this.asyncMap.size += 1;
}
else {
if (this.asyncMap.size >= this.maxSize) {
this._removeOldest();

@@ -113,2 +106,11 @@ }

};
if (this.asyncMap.oldestId === -1) {
this.asyncMap.oldestId = asyncId;
}
const previousNode = this.asyncMap[this.previousId];
if (previousNode !== undefined) {
previousNode.nextId = asyncId;
}
this.previousId = asyncId;
this.asyncMap.size += 1;
}

@@ -115,0 +117,0 @@ }

{
"name": "@creditkarma/async-scope",
"version": "0.0.12",
"version": "0.0.13",
"description": "A thread local approximation built on async hooks, written in TypeScript",

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

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