Skip to content

Commit 25965d3

Browse files
committed
refactor(expose, hide): rename exposedGlobals to globals
1 parent aacfa71 commit 25965d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compiler.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ globalObj.$nxCompileCreateBackup = createBackup
1717
const proxies = new WeakMap()
1818
const expressionCache = new Map()
1919
const codeCache = new Map()
20-
const exposedGlobals = new Set()
20+
const globals = new Set()
2121
const handlers = {has}
2222

2323
function compileExpression (src) {
@@ -60,14 +60,14 @@ function expose (globalName) {
6060
if (typeof globalName !== 'string') {
6161
throw new TypeError('first argument must be a string')
6262
}
63-
exposedGlobals.add(globalName)
63+
globals.add(globalName)
6464
}
6565

6666
function hide (globalName) {
6767
if (typeof globalName !== 'string') {
6868
throw new TypeError('first argument must be a string')
6969
}
70-
exposedGlobals.delete(globalName)
70+
globals.delete(globalName)
7171
}
7272

7373
function toSandbox (obj) {
@@ -93,5 +93,5 @@ function createBackup (context, tempVars) {
9393
}
9494

9595
function has (target, key) {
96-
return exposedGlobals.has(key) ? Reflect.has(target, key) : true
96+
return globals.has(key) ? Reflect.has(target, key) : true
9797
}

0 commit comments

Comments
 (0)