From 3263ca98d777bef6ddc0a599e18d388d74e832d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Sun, 4 Oct 2020 23:15:26 +0800 Subject: [PATCH] =?UTF-8?q?mem=E6=A8=A1=E5=BC=8F=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8C=81=E4=B9=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mem-store.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/mem-store.js b/lib/mem-store.js index 0dc8f6b..3dec72b 100644 --- a/lib/mem-store.js +++ b/lib/mem-store.js @@ -4,14 +4,7 @@ * @date 2020/09/18 16:35:26 */ -function hideProperty(host, name, value) { - Object.defineProperty(host, name, { - value: value, - writable: true, - enumerable: false, - configurable: true - }) -} +import fs from 'fs' export default class Session { constructor(opt) { @@ -33,7 +26,7 @@ export default class Session { } // 设置session有效期 - hideProperty(session, '__expires__', Date.now() + this.ttl * 1000) + session.__expires__ = Date.now() + this.ttl * 1000 } // 获取session字段值