| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0f52358 commit 3d45b35
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,12 +39,12 @@ const parentModule = module; | |||
| 39 | 39 | const replMap = new WeakMap(); | |
| 40 | 40 | ||
| 41 | 41 | const GLOBAL_OBJECT_PROPERTIES = ['NaN', 'Infinity', 'undefined', | |
| 42 | - 'eval', 'parseInt', 'parseFloat', 'isNaN', 'isFinite', 'decodeURI', | ||
| 43 | - 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', | ||
| 44 | - 'Object', 'Function', 'Array', 'String', 'Boolean', 'Number', | ||
| 45 | - 'Date', 'RegExp', 'Error', 'EvalError', 'RangeError', | ||
| 46 | - 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', | ||
| 47 | - 'Math', 'JSON']; | ||
| 42 | + 'eval', 'parseInt', 'parseFloat', 'isNaN', 'isFinite', 'decodeURI', | ||
| 43 | + 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', | ||
| 44 | + 'Object', 'Function', 'Array', 'String', 'Boolean', 'Number', | ||
| 45 | + 'Date', 'RegExp', 'Error', 'EvalError', 'RangeError', | ||
| 46 | + 'ReferenceError', 'SyntaxError', 'TypeError', 'URIError', | ||
| 47 | + 'Math', 'JSON']; | ||
| 48 | 48 | const GLOBAL_OBJECT_PROPERTY_MAP = {}; | |
| 49 | 49 | GLOBAL_OBJECT_PROPERTIES.forEach((p) => GLOBAL_OBJECT_PROPERTY_MAP[p] = p); | |
| 50 | 50 | ||
@@ -622,7 +622,7 @@ ArrayStream.prototype.writable = true; | |||
| 622 | 622 | ArrayStream.prototype.resume = function() {}; | |
| 623 | 623 | ArrayStream.prototype.write = function() {}; | |
| 624 | 624 | ||
| 625 | - const requireRE = /\brequire\s*\(['"](([\w\.\/-]+\/)?([\w\.\/-]*))/; | ||
| 625 | + const requireRE = /\brequire\s*\(['"](([\w./-]+\/)?([\w./-]*))/; | ||
| 626 | 626 | const simpleExpressionRE = | |
| 627 | 627 | /(([a-zA-Z_$](?:\w|\$)*)\.)*([a-zA-Z_$](?:\w|\$)*)\.?$/; | |
| 628 | 628 | ||
@@ -870,7 +870,7 @@ REPLServer.prototype.complete = function(line, callback) { | |||
| 870 | 870 | var newCompletionGroups = []; | |
| 871 | 871 | for (i = 0; i < completionGroups.length; i++) { | |
| 872 | 872 | group = completionGroups[i].filter(function(elem) { | |
| 873 | - return elem.indexOf(filter) == 0; | ||
| 873 | + return elem.indexOf(filter) === 0; | ||
| 874 | 874 | }); | |
| 875 | 875 | if (group.length) { | |
| 876 | 876 | newCompletionGroups.push(group); | |
@@ -1124,8 +1124,8 @@ function regexpEscape(s) { | |||
| 1124 | 1124 | * @return {String} The converted command. | |
| 1125 | 1125 | */ | |
| 1126 | 1126 | REPLServer.prototype.convertToContext = function(cmd) { | |
| 1127 | - const scopeVar = /^\s*var\s*([_\w\$]+)(.*)$/m; | ||
| 1128 | - const scopeFunc = /^\s*function\s*([_\w\$]+)/; | ||
| 1127 | + const scopeVar = /^\s*var\s*([\w$]+)(.*)$/m; | ||
| 1128 | + const scopeFunc = /^\s*function\s*([\w$]+)/; | ||
| 1129 | 1129 | var matches; | |
| 1130 | 1130 | ||
| 1131 | 1131 | // Replaces: var foo = "bar"; with: self.context.foo = bar; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments