continuation-local-storage
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -17,4 +17,2 @@ 'use strict'; | ||
var namespaces; | ||
function Namespace(name) { | ||
@@ -159,3 +157,3 @@ this.name = name; | ||
function get(name) { | ||
return namespaces[name]; | ||
return process.namespaces[name]; | ||
} | ||
@@ -174,3 +172,3 @@ | ||
namespaces[name] = namespace; | ||
process.namespaces[name] = namespace; | ||
return namespace; | ||
@@ -186,3 +184,3 @@ } | ||
process.removeAsyncListener(namespace.id); | ||
namespaces[name] = null; | ||
process.namespaces[name] = null; | ||
} | ||
@@ -192,10 +190,10 @@ | ||
// must unregister async listeners | ||
if (namespaces) { | ||
Object.keys(namespaces).forEach(function (name) { | ||
if (process.namespaces) { | ||
Object.keys(process.namespaces).forEach(function (name) { | ||
destroy(name); | ||
}); | ||
} | ||
namespaces = process.namespaces = Object.create(null); | ||
process.namespaces = Object.create(null); | ||
} | ||
reset(); // call immediately to set up | ||
if (!process.namespaces) reset(); // call immediately to set up | ||
@@ -202,0 +200,0 @@ module.exports = { |
{ | ||
"name": "continuation-local-storage", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "userland implementation of https://github.com/joyent/node/issues/5243", | ||
@@ -5,0 +5,0 @@ "main": "context.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92091
2054