Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
22762b8eec | |||
849f4f617b |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "smartcls",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartcls",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"description": "continuation-local-storage using native AsyncLocalStorage",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
|
@ -13,6 +13,10 @@ export class SmartCls {
|
||||
|
||||
public get(keyArg: string) {
|
||||
const store: any = this.asyncLocalStorage.getStore();
|
||||
if (store) {
|
||||
return store[keyArg];
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user