feat: add node shim

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-05-11 22:13:03 +08:00
parent 0120e84f3f
commit f1863c3b39
3 changed files with 26 additions and 13 deletions

View File

@@ -0,0 +1,8 @@
global.setGlobal('process', {
env: {
__noSuchProperty__: (prop) => {
return Packages.java.lang.System.getenv(prop)
}
},
platform: Packages.java.lang.System.getProperty("os.name")
}, {})