Every line of 'what is the default scope in node.js application' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
118 function getScope (node) { 119 for ( 120 var p = node; 121 !isFunction(p) && p.type !== 'Program'; 122 p = p.parent 123 ); 124 var id = idOf(p); 125 if (!locals[id]) locals[id] = {}; 126 return id; 127 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
281 scopeValue(name) { 282 let scopes = this.filterScopes(name); 283 284 if (scopes.length) { 285 return scopes[scopes.length - 1][name]; 286 } 287 }
199 function getGlobalScope(): Window { 200 if (typeof self !== 'undefined') { 201 return self 202 } 203 if (typeof window !== 'undefined') { 204 return window 205 } 206 // This function is meant to be called when accessing APIs that are typically only available in 207 // web-browser/DOM environments, but we also want to support situations where running in Node.js 208 // environment, and a polyfill was added to the Node.js `global` object scope without adding the 209 // `window` global object as well. 210 if (typeof global !== 'undefined') { 211 return (global as unknown) as Window 212 } 213 throw new Error('Unexpected runtime environment - no supported global scope (`window`, `self`, `global`) available') 214 }
52 function executeScope (scope, locals, node) { 53 scope = Object.assign(locals, scope) 54 55 return walk({ locals: scope }, node.content) 56 }
291 function getScopeForReactLive(name) { 292 const baseScope = { [name]: Components[name] }; 293 return (DEMO[name.toUpperCase()].EXTRA_SCOPE || []).reduce( 294 (accum, compName) => ({ ...accum, [compName]: Components[compName] }), 295 baseScope 296 ); 297 }
116 NodePath.prototype.getScope = function getScope(scope) { 117 var ourScope = scope; 118 119 // we're entering a new scope so let's construct it! 120 if (this.isScope()) { 121 ourScope = new _scope2["default"](this, scope); 122 } 123 124 return ourScope; 125 };
136 _proto.getScope = function getScope(scope) { 137 return this.isScope() ? new _scope.default(this) : scope; 138 };
203 public getScope() { 204 return this.scope; 205 }
138 createScope(parentScope: ChildScope) { 139 this.scope = parentScope; 140 }
538 function getScope(v, state) { 539 var f 540 for (var i = state.length - 1; i >= 0; i--) { 541 if (state[i].scope && state[i].scope[v]) { 542 f = state[i] 543 break 544 } 545 } 546 return f 547 }