From 6f40082f48a203113feef1ec001606a7bdede956 Mon Sep 17 00:00:00 2001 From: shenjack-5600u <3695888@qq.com> Date: Tue, 2 Apr 2024 20:25:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E8=BF=90=E8=A1=8C=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- branch/latest/md5.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/branch/latest/md5.js b/branch/latest/md5.js index 0baa6e6..cbda434 100644 --- a/branch/latest/md5.js +++ b/branch/latest/md5.js @@ -1,7 +1,8 @@ // let document = document; // let window = window; -'use strict'; +// 'use strict'; +// 兼容nodejs, 要不然 window = {}; 会崩 let name_input = "test\ntest2"; let assets_data = { @@ -10,9 +11,13 @@ let assets_data = { }; let run_env = { - + from_code: (typeof window == "undefined"), + is_node: (typeof Bun == "undefined"), + is_bun: (typeof Bun != "undefined"), }; +console.log("run_env", run_env); + let from_code = typeof window == "undefined";